Xiajijian
2025-11-29 bd2ead7fc4642833ae6188574e5738407e988c1c
ard-admin/src/main/java/com/ard/web/controller/sample/LiveStreamController.java
@@ -4,8 +4,10 @@
import com.ard.common.utils.SecurityUtils;
import com.ard.sample.common.model.ResponseResult;
import com.ard.sample.component.mqtt.model.ChannelName;
import com.ard.sample.component.websocket.handler.LiveStreamHandler;
import com.ard.sample.manage.model.dto.CapacityDeviceDTO;
import com.ard.sample.manage.model.dto.LiveTypeDTO;
import com.ard.sample.manage.model.param.RemoteDebugParam;
import com.ard.sample.manage.model.receiver.LiveCapacityReceiver;
import com.ard.sample.manage.service.ILiveStreamService;
import com.fasterxml.jackson.databind.ObjectMapper;
@@ -37,6 +39,9 @@
    private ILiveStreamService liveStreamService;
    @Autowired
    private LiveStreamHandler _liveStreamHandler;
    @Autowired
    private ObjectMapper mapper;
    /**
@@ -66,6 +71,21 @@
        return ResponseResult.success(liveCapacity);
    }
    @ApiOperation("获取video_id")
    @PostMapping("/videoid/{sn}")
    public ResponseResult<LiveTypeDTO> getVideoId(@PathVariable String sn) {
        LiveTypeDTO liveTypeDTO = new LiveTypeDTO();
        try{
            liveTypeDTO = _liveStreamHandler.getLiveParam(sn);
        }
        catch (Exception e){
            // videoId = e.getMessage();
            e.printStackTrace();
        }
        return ResponseResult.success(liveTypeDTO);
    }
    /**
     * Live streaming according to the parameters passed in from the web side.
     *