diff --git a/src/views/home/components/Device.vue b/src/views/home/components/Device.vue index a8f64ea..c0397b9 100644 --- a/src/views/home/components/Device.vue +++ b/src/views/home/components/Device.vue @@ -33,7 +33,6 @@ export default defineComponent({ const handleCameraReverse = () => { const index = data.videoList.findIndex((item) => item.deviceId === data.videoDeviceId) const len = data.videoList.length - alert(len) if (len <= 1) { return } else if (index === 0) { @@ -42,14 +41,14 @@ export default defineComponent({ cameraId: data.videoDeviceId, microphoneId: data.audioDeviceId }) - emit('switch', { type: 'video', deviceId: data.cameraId }) + emit('switch', { type: 'video', cameraId: data.videoDeviceId }) } else { data.videoDeviceId = data.videoList[0].deviceId emit('init', { cameraId: data.videoDeviceId, microphoneId: data.audioDeviceId }) - emit('switch', { type: 'video', deviceId: data.cameraId }) + emit('switch', { type: 'video', cameraId: data.videoDeviceId }) } } diff --git a/src/views/home/index.vue b/src/views/home/index.vue index be4207f..d4d69c3 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -1,8 +1,8 @@