liusuyi
2026-06-01 3496700a5ba18be8ca0590a79e21a867782d1ea9
ard-modules/ard-modules-zlm/src/main/java/com/ard/zlm/service/impl/DevicePlayServiceImpl.java
@@ -1,7 +1,8 @@
package com.ard.zlm.service.impl;
import com.ard.common.core.enums.LiveStreamType;
import com.ard.qs.api.domain.QsDevice;
import com.ard.zlm.domain.StreamChannel;
import com.ard.work.api.domian.ArdChannel;
import com.ard.zlm.api.domain.StreamInfo;
import com.ard.zlm.service.ErrorCallback;
import com.ard.zlm.service.IDevicePlayService;
@@ -28,15 +29,15 @@
    public final static String PLAY_SERVICE = "sourceDevicePlayService";
    @Override
    public void play(QsDevice device, Boolean record, ErrorCallback<StreamInfo> callback) {
        log.info("[设备] 播放, 类型: {}", LiveStreamType.getByCode(device.getType()));
    public void play(ArdChannel channel, Boolean record, ErrorCallback<StreamInfo> callback) {
        log.info("[设备] 播放, 类型: {}", LiveStreamType.getByCode(channel.getType()));
        ISourcePlayService sourceChannelPlayService = sourcePlayServiceMap.get(PLAY_SERVICE);
        if (sourceChannelPlayService == null) {
            // 设备数据异常
            log.error("[点播通用设备] 类型编号: {} 不支持实时流预览", LiveStreamType.getByCode(device.getType()));
            log.error("[点播通用设备] 类型编号: {} 不支持实时流预览", LiveStreamType.getByCode(channel.getType()));
            throw new RuntimeException("Device not supported");
        }
        sourceChannelPlayService.play(device, record, (code, msg, data) -> {
        sourceChannelPlayService.play(channel, record, (code, msg, data) -> {
            callback.run(code, msg, data);
        });
    }