|
@@ -35,7 +35,7 @@ import {
|
|
|
} from 'vue'
|
|
} from 'vue'
|
|
|
import WebRtcService from '@/services/webrtc.service'
|
|
import WebRtcService from '@/services/webrtc.service'
|
|
|
import topBar from '@/components/topBar.vue'
|
|
import topBar from '@/components/topBar.vue'
|
|
|
-import Gauge from '@/components/gauge.vue'
|
|
|
|
|
|
|
+import Gauge from './component/gauge.vue'
|
|
|
import useStore from '@/store/index'
|
|
import useStore from '@/store/index'
|
|
|
|
|
|
|
|
const RTC = new WebRtcService()
|
|
const RTC = new WebRtcService()
|
|
@@ -44,11 +44,11 @@ const mqtt = inject('MQTT') as Any
|
|
|
const remoteVideo = ref(null as unknown as HTMLVideoElement)
|
|
const remoteVideo = ref(null as unknown as HTMLVideoElement)
|
|
|
const gauge = ref({ speed: 0, num: 0 })
|
|
const gauge = ref({ speed: 0, num: 0 })
|
|
|
const menuList = shallowRef([
|
|
const menuList = shallowRef([
|
|
|
- { name: '信号', value: 0, component: defineAsyncComponent(() => import('@/components/signal.vue')) },
|
|
|
|
|
- { name: '电量', value: 0, component: defineAsyncComponent(() => import('@/components/battery.vue')) },
|
|
|
|
|
|
|
+ { name: '信号', value: 0, component: defineAsyncComponent(() => import('./component/signal.vue')) },
|
|
|
|
|
+ { name: '电量', value: 0, component: defineAsyncComponent(() => import('./component/battery.vue')) },
|
|
|
{
|
|
{
|
|
|
name: '方向盘',
|
|
name: '方向盘',
|
|
|
- component: defineAsyncComponent(() => import('@/components/steering.vue')),
|
|
|
|
|
|
|
+ component: defineAsyncComponent(() => import('./component/steering.vue')),
|
|
|
callBack: (gamepad) => {
|
|
callBack: (gamepad) => {
|
|
|
const { axes, buttons } = gamepad
|
|
const { axes, buttons } = gamepad
|
|
|
console.log('方向盘', axes)
|
|
console.log('方向盘', axes)
|
|
@@ -57,12 +57,12 @@ const menuList = shallowRef([
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
name: '静音',
|
|
name: '静音',
|
|
|
- component: defineAsyncComponent(() => import('@/components/audio.vue')),
|
|
|
|
|
|
|
+ component: defineAsyncComponent(() => import('./component/audio.vue')),
|
|
|
callBack: (mute: boolean) => RTC.muteRemoteAudio(mute)
|
|
callBack: (mute: boolean) => RTC.muteRemoteAudio(mute)
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
name: '录音',
|
|
name: '录音',
|
|
|
- component: defineAsyncComponent(() => import('@/components/mic.vue')),
|
|
|
|
|
|
|
+ component: defineAsyncComponent(() => import('./component/mic.vue')),
|
|
|
callBack: (blob: Blob) => {
|
|
callBack: (blob: Blob) => {
|
|
|
console.log('发送对讲', blob)
|
|
console.log('发送对讲', blob)
|
|
|
}
|
|
}
|