We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fc8511c commit 0a2868eCopy full SHA for 0a2868e
app/components/Scan.vue
@@ -64,8 +64,11 @@ watchEffect(() => {
64
let qrScanner: QrScanner | undefined
65
66
watch(cameras, () => {
67
- if (selectedCamera.value && cameras.value.find(i => i.deviceId === selectedCamera.value))
68
- qrScanner?.setCamera(selectedCamera.value)
+ if (selectedCamera.value && cameras.value.find(i => i.deviceId === selectedCamera.value)) {
+ setTimeout(() => {
69
+ qrScanner?.setCamera(selectedCamera.value!)
70
+ }, 250)
71
+ }
72
})
73
74
const error = ref<any>()
0 commit comments