Procházet zdrojové kódy

change device

master
zhangtao před 1 rokem
rodič
revize
ca616cfb08
1 změnil soubory, kde provedl 3 přidání a 3 odebrání
  1. +3
    -3
      src/views/home/components/Device.vue

+ 3
- 3
src/views/home/components/Device.vue Zobrazit soubor

@@ -39,16 +39,16 @@ export default defineComponent({
const handleReverse = () => {
const index = data.videoList.findIndex((item) => item.deviceId === data.activeDeviceId)
const len = data.videoList.length
if (len === 1) {
if (len <= 1) {
return
} else if (index === 0) {
data.videoDeviceId = data.deviceList[len - 1].deviceId
data.videoDeviceId = data.videoList[len - 1].deviceId
emit('init', {
cameraId: data.videoDeviceId,
microphoneId: data.audioDeviceId
})
} else {
data.videoDeviceId = data.deviceList[0].deviceId
data.videoDeviceId = data.videoList[0].deviceId
emit('init', {
cameraId: data.videoDeviceId,
microphoneId: data.audioDeviceId

Načítá se…
Zrušit
Uložit