| | |
| | | import com.ard.sample.component.websocket.enums.MessageType; |
| | | import com.ard.sample.component.websocket.model.Payload; |
| | | import com.ard.sample.component.websocket.model.WebSocketMessage; |
| | | import com.ard.sample.manage.service.IControlService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | |
| | | |
| | | @Autowired |
| | | private LiveStreamHandler _liveStreamService; |
| | | |
| | | @Autowired |
| | | private IControlService _controlService; |
| | | |
| | | // ====================== 心跳相关常量(可配置化建议放到配置文件) ====================== |
| | | /** 心跳间隔(秒):客户端需每隔此时间发送一次PING消息 */ |
| | |
| | | log.info("SN: {}-更新webrtc地址成功!", sn); |
| | | } |
| | | } |
| | | else { |
| | | log.info("SN: {}-开启直播失败!返回值:{}", sn, rlive); |
| | | } |
| | | } |
| | | _dockWebSocketHandler.sendMessageToSubscribers(sn, MessageType.LIVESTREAM.getType(), resultLive, userId); |
| | | log.info("SN: {}-直播地址:{}", sn, resultLive); |
| | |
| | | LiveTypeDTO param = getLiveParam(sn); |
| | | // 停止直播逻辑 |
| | | rlive = _liveStreamService.liveStop(param.getVideoId()); |
| | | log.info("SN: {}-停止直播!返回值:{}", sn, rlive); |
| | | // rlive.setGateway(sn); |
| | | // rlive.setType(MessageType.LIVESTREAM.getType()); |
| | | // resultLive = _objectMapper.writeValueAsString(rlive); |
| | |
| | | // 飞行轨迹数据 |
| | | listTrajectory.add(dataJson); |
| | | log.info("SN:{} 轨迹点数据添加到列表缓存,当前列表数量:{}", sn, listTrajectory.size()); |
| | | log.info("SN:{} 轨迹点数据:{}", sn, dataJson); |
| | | // log.info("SN:{} 轨迹点数据:{}", sn, dataJson); |
| | | } |
| | | if (type.equals("1")) { |
| | | // 任务状态数据 |