|
|
@@ -68,7 +68,7 @@
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
import { message } from 'ant-design-vue'
|
|
|
-import { onMounted, reactive, ref } from 'vue'
|
|
|
+import { onMounted, ref } from 'vue'
|
|
|
import { CURRENT_CONFIG as config } from '/@/api/http/config'
|
|
|
import { changeLivestreamLens, getLiveCapacity, setLivestreamQuality, startLivestream, stopLivestream } from '/@/api/manage'
|
|
|
import { getRoot } from '/@/root'
|
|
|
@@ -101,6 +101,7 @@ const liveTypeList: SelectOption[] = [
|
|
|
label: 'WEBRTC'
|
|
|
}
|
|
|
]
|
|
|
+
|
|
|
const clarityList: SelectOption[] = [
|
|
|
{
|
|
|
value: 0,
|
|
|
@@ -178,6 +179,7 @@ const onRefresh = async () => {
|
|
|
onMounted(() => {
|
|
|
onRefresh()
|
|
|
})
|
|
|
+
|
|
|
const onStart = async () => {
|
|
|
console.log(
|
|
|
'Param:',
|
|
|
@@ -276,6 +278,7 @@ const onStart = async () => {
|
|
|
console.error(err)
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
const onStop = () => {
|
|
|
videoId.value =
|
|
|
droneSelected.value + '/' + cameraSelected.value + '/' + (videoSelected.value || nonSwitchable + '-0')
|
|
|
@@ -309,6 +312,7 @@ const onUpdateQuality = () => {
|
|
|
const onLiveTypeSelect = (val: any) => {
|
|
|
livetypeSelected.value = val
|
|
|
}
|
|
|
+
|
|
|
const onDroneSelect = (val: SelectOption) => {
|
|
|
droneSelected.value = val.value
|
|
|
const temp: Array<SelectOption> = []
|
|
|
@@ -325,6 +329,7 @@ const onDroneSelect = (val: SelectOption) => {
|
|
|
})
|
|
|
cameraList.value = temp
|
|
|
}
|
|
|
+
|
|
|
const onCameraSelect = (val: SelectOption) => {
|
|
|
cameraSelected.value = val.value
|
|
|
const result: Array<SelectOption> = []
|
|
|
@@ -348,14 +353,17 @@ const onCameraSelect = (val: SelectOption) => {
|
|
|
lensSelected.value = firstVideo.label
|
|
|
isDockLive.value = lensList.value?.length > 0
|
|
|
}
|
|
|
+
|
|
|
const onVideoSelect = (val: SelectOption) => {
|
|
|
videoSelected.value = val.value
|
|
|
lensList.value = val.more
|
|
|
lensSelected.value = val.label
|
|
|
}
|
|
|
+
|
|
|
const onClaritySelect = (val: any) => {
|
|
|
claritySelected.value = val
|
|
|
}
|
|
|
+
|
|
|
const onSwitch = () => {
|
|
|
if (lensSelected.value === undefined || lensSelected.value === nonSwitchable) {
|
|
|
message.info('The ' + nonSwitchable + ' lens cannot be switched, please select the lens to be switched.', 8)
|
|
|
@@ -370,6 +378,7 @@ const onSwitch = () => {
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
const playWebrtc = (videoElement: HTMLMediaElement, url: string) => {
|
|
|
if (webrtc) {
|
|
|
webrtc.close()
|
|
|
@@ -387,4 +396,4 @@ const playWebrtc = (videoElement: HTMLMediaElement, url: string) => {
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
@import '/@/styles/index.scss';
|
|
|
-</style>
|
|
|
+</style>
|