| | |
| | | </div> |
| | | <a-row class="p5" v-if="showMonitor"> |
| | | <!-- <a-spin :spinning="spinning"> --> |
| | | <Jessibuca v-if="airPortUrl" :videoUrl="airPortUrl" width="100%" height="200px" /> |
| | | <Jessibuca v-if="airPortUrl" :videoUrl="airPortUrl" width="100%" height="300px" /> |
| | | <!-- </a-spin> --> |
| | | </a-row> |
| | | <!-- 飞机--> |
| | |
| | | '' }}{{ deviceInfo.device.battery.remain_flight_time % 60 }} |
| | | </div> |
| | | </div> |
| | | <!-- 飞行指令 |
| | | <!-- 飞行指令 --> |
| | | <DroneControlPanel :sn="osdVisible.gateway_sn" :deviceInfo="deviceInfo" :payloads="osdVisible.payloads"> |
| | | </DroneControlPanel> --> |
| | | </DroneControlPanel> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | import { deviceTsaUpdate } from '/@/hooks/use-g-map-tsa' |
| | | import Jessibuca from '/@/components/Jessibuca/Jessibuca.vue' |
| | | import { CURRENT_CONFIG as config } from '/@/api/http/config' |
| | | import { getLiveCapacity, startLivestream } from '/@/api/manage' |
| | | import { getLiveCapacity, startLivestream, stopLivestream } from '/@/api/manage' |
| | | import { |
| | | DeviceOsd, DeviceStatus, DockOsd, EGear, EModeCode, GatewayOsd, EDockModeCode, EDockModeText, EModeText, |
| | | NetworkStateQualityEnum, NetworkStateTypeEnum, RainfallEnum, DroneInDockEnum |
| | |
| | | // 打开监控权限 |
| | | const openMonitor = () => { |
| | | showMonitor.value = !showMonitor.value |
| | | loadVideo() |
| | | if (showMonitor.value) { |
| | | loadVideo() |
| | | } else { |
| | | onClose() |
| | | } |
| | | } |
| | | // 加载该设备的视频信息 |
| | | const loadVideo = async () => { |
| | |
| | | console.error(error) |
| | | }) |
| | | } |
| | | // 开始播放 |
| | | // 设备开始播放 |
| | | const onStart = async () => { |
| | | const videoId = droneList.value[droneIndex.value].value + '/' + cameraList.value[cameraIndex.value].value + '/' + videoList.value[videoIndex.value].value |
| | | const streamId = droneList.value[droneIndex.value].value + '-' + cameraList.value[cameraIndex.value].value + '-' + videoList.value[videoIndex.value].value |
| | | console.log(videoId, 'videoId') |
| | | const liveURL = config.rtmpURL + streamId |
| | | await startLivestream({ |
| | | url: liveURL, |
| | |
| | | console.log(airPortUrl.value, 'airPortUrl') |
| | | }) |
| | | } |
| | | // 关闭设备直播 |
| | | const onClose = async () => { |
| | | const videoId = droneList.value[droneIndex.value].value + '/' + cameraList.value[cameraIndex.value].value + '/' + videoList.value[videoIndex.value].value |
| | | |
| | | stopLivestream({ |
| | | video_id: videoId |
| | | }).then(res => { |
| | | if (res.code === 0) { |
| | | console.log('stop play livestream') |
| | | airPortUrl.value = '' |
| | | } |
| | | }) |
| | | } |
| | | watch(() => store.state.deviceStatusEvent, |
| | | data => { |
| | | if (Object.keys(data.deviceOnline).length !== 0) { |