We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5c03e69 commit aef6882Copy full SHA for aef6882
1 file changed
src/components/Utilities/QRCamera.vue
@@ -83,6 +83,10 @@ function switchCamera() {
83
console.log(cameraStore.cameraDevices)
84
console.log('switchCamera: cameraDevices.value = ' + cameraStore.cameraDevices.value)
85
console.log('camerastore.cameradevices.length = ' + cameraStore.cameraDevices.length)
86
+ // when access is not granted, the cameraStore contains only one entry
87
+ // with an empty id, no more information is provided
88
+ // In this case, since we are here already and access is granted, reload the
89
+ // set of available cameras so that we can switch to the back facing one.
90
if (cameraStore.cameraDevices.length === 1 && cameraStore.cameraDevices[0].id == "") {
91
console.log("No cameras found in cameraStore, re-enumerating them")
92
updateAvailableCamera()
0 commit comments