Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
canwdev committed Apr 8, 2023
1 parent 1e22202 commit e57103e
Showing 1 changed file with 20 additions and 16 deletions.
36 changes: 20 additions & 16 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -250,24 +250,28 @@
const videoId = currentVideoDeviceId.value
const audioId = currentAudioDeviceId.value

let vConfig = videoConfig.value

if (!vConfig || vConfig.deviceId !== videoId) {
const vDevice = videoDeviceList.value.find(i => {
return i.deviceId === videoId
})
console.log(vDevice)

if (vDevice) {
const conf = vDevice.getCapabilities()
vConfig = videoConfig.value = {
deviceId: conf.deviceId,
height: conf.height.max,
width: conf.width.max,
frameRate: conf.frameRate.max
let vConfig = false

if (videoId) {
if (!videoConfig.value || videoConfig.value.deviceId !== videoId) {
const vDevice = videoDeviceList.value.find(i => {
return i.deviceId === videoId
})
console.log(vDevice)

if (vDevice) {
const conf = vDevice.getCapabilities()
vConfig = videoConfig.value = {
deviceId: conf.deviceId,
height: conf.height.max,
width: conf.width.max,
frameRate: conf.frameRate.max
}
} else {
vConfig = { deviceId: videoId }
}
} else {
vConfig = { deviceId: videoId }
vConfig = videoConfig.value
}
}

Expand Down

0 comments on commit e57103e

Please sign in to comment.