| | |
| | | } |
| | | // 下拉框选择变化 |
| | | const selectChange = async (e) => { |
| | | await closeFly() |
| | | setTimeout(async () => { |
| | | await flyOnStart() |
| | | }, 500) |
| | | // await closeFly() |
| | | // setTimeout(async () => { |
| | | await flyOnStart() |
| | | // }, 500) |
| | | } |
| | | // 关闭设备直播 |
| | | const onClose = async () => { |
| | |
| | | } |
| | | // 飞机设备播放 |
| | | const flyOnStart = async () => { |
| | | aircraftUrl.value = '' |
| | | const videoId = deviceInfo.dock.basic_osd?.sub_device?.device_sn + '/' + aircraSelected.value + '/' + 'normal-0' |
| | | const streamId = deviceInfo.dock.basic_osd?.sub_device?.device_sn + '-' + aircraSelected.value + '-' + 'normal-0' |
| | | const liveURL = config.rtmpURL + streamId |
| | |
| | | } |
| | | // 飞行设备关闭 |
| | | const closeFly = async () => { |
| | | const videoId = deviceInfo.dock.basic_osd?.sub_device?.device_sn + '/' + aircraSelected.value + '/' + 'normal-0' |
| | | aircraftList.value.forEach(item => { |
| | | const videoId = deviceInfo.dock.basic_osd?.sub_device?.device_sn + '/' + item.value + '/' + 'normal-0' |
| | | stopLivestream({ |
| | | video_id: videoId |
| | | }).then(res => { |
| | | console.log(res, 'res') |
| | | if (res.code === 0) { |
| | | aircraftUrl.value = '' |
| | | } |
| | | }).catch(e => { |
| | | console.log(e, 'errrrrrrrrrrrrrr') |
| | | }) |
| | | }) |
| | | // const videoId = deviceInfo.dock.basic_osd?.sub_device?.device_sn + '/' + aircraSelected.value + '/' + 'normal-0' |
| | | aircraftList.value = [] |
| | | aircraSelected.value = '' |
| | | stopLivestream({ |
| | | video_id: videoId |
| | | }).then(res => { |
| | | if (res.code === 0) { |
| | | aircraftUrl.value = '' |
| | | } |
| | | }) |
| | | } |
| | | watch(() => store.state.deviceStatusEvent, |
| | | data => { |