Przeglądaj źródła

change camera

master
zhangtao 1 rok temu
rodzic
commit
29e1ccad73
2 zmienionych plików z 6 dodań i 4 usunięć
  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 Wyświetl plik

@@ -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 Wyświetl plik

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

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

onMounted(() => {

Ładowanie…
Anuluj
Zapisz