Bläddra i källkod

change camera

master
zhangtao 1 år sedan
förälder
incheckning
29e1ccad73
2 ändrade filer med 6 tillägg och 4 borttagningar
  1. +3
    -3
      src/views/home/components/Device.vue
  2. +3
    -1
      src/views/home/index.vue

+ 3
- 3
src/views/home/components/Device.vue Visa fil

@@ -61,12 +61,12 @@ export default defineComponent({
const index = data.deviceList.findIndex((item) => item.deviceId === data.activeDeviceId)
if (data.deviceList.length === 1) {
return
} else if (index === data.deviceList.length - 1) {
data.activeDeviceId = data.deviceList[index - 1].deviceId
} else if (index === 0) {
data.activeDeviceId = data.deviceList[1].deviceId
emit('update:value', data.activeDeviceId)
emit('switch', { type: props.deviceType, deviceId: data.activeDeviceId })
} else {
data.activeDeviceId = data.deviceList[index + 1].deviceId
data.activeDeviceId = data.deviceList[0].deviceId
emit('update:value', data.activeDeviceId)
emit('switch', { type: props.deviceType, deviceId: data.activeDeviceId })
}

+ 3
- 1
src/views/home/index.vue Visa fil

@@ -460,7 +460,9 @@ export default {
}

const handelCameraReverse = () => {
cameraRef.value.handleReverse()
if (!status.isMutedVideo) {
cameraRef.value.handleReverse()
}
}

onMounted(() => {

Laddar…
Avbryt
Spara