-
Notifications
You must be signed in to change notification settings - Fork 341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Detect and tracking don't work anymore if choose a camera with constraints #416
Comments
Scanner does not work anymore after when `deviceId` via `constraints` is updated and no other props are changed. This is because: ==> both `cameraActive.value` and `cameraSettings.shouldStream` stay `true` ==> then `shouldScan` also does not change ==> therefore the watcher on `shouldScan` is not triggered ==> and finally we don't start a new scanning process To prevent that, we now explicitly set `cameraActive` to `false` right before requesting a new camera. That is not just a hack but also makes semantically sense, because the camera is briefly inactive right before requesting a new camera. See: #416
Scanner does not work anymore after when `deviceId` via `constraints` is updated and no other props are changed. This is because: ==> both `cameraActive.value` and `cameraSettings.shouldStream` stay `true` ==> then `shouldScan` also does not change ==> therefore the watcher on `shouldScan` is not triggered ==> and finally we don't start a new scanning process To prevent that, we now explicitly set `cameraActive` to `false` right before requesting a new camera. That is not just a hack but also makes semantically sense, because the camera is briefly inactive right before requesting a new camera. See: #416
Thanks, I'm not sure if I reproduced your problem exactly but I found a bug and merged a fix. Please install v5.5.2 and check if you can still reproduce your problem. As for the Safari issue you mention:
I'm not sure what's going on there. |
@viac92 I have the same issue. I've downgraded to |
Unify demos: * Handle Errors * Visual Tracking * Visual Tracking with Formats * Enumerate Devices into a single demo. That makes the demo more complicated but allows easier testing of the combination of features. See: #416
Unify demos: * Handle Errors * Visual Tracking * Visual Tracking with Formats * Enumerate Devices into a single demo. That makes the demo more complicated but allows easier testing of the combination of features. See: #416
Unify demos: * Handle Errors * Visual Tracking * Visual Tracking with Formats * Enumerate Devices into a single demo. That makes the demo more complicated but allows easier testing of the combination of features. See: #416
@marcelloromanelli I can't reproduce this issue. Can you provide a minimal reproduction? Ideally somewhere online. |
Unify demos: * Handle Errors * Visual Tracking * Visual Tracking with Formats * Enumerate Devices into a single demo. That makes the demo more complicated but allows easier testing of the combination of features. See: #416
I'm having a similar issue. Only shows up when using contraints and paused. I'll setup a reproduction when I get a moment. |
Well, I was trying to reproduce this in a sandbox and couldn't. For whatever reason it suddenly started working in the project I was having issues with too.... |
Yeah, there is a lot of async stuff going. I suspect there are some race conditions. |
please fix it |
Please provide a way for me to reproduce it |
This issue has been marked as stale. If there is no further activity it will be closed. |
Hi everyone,
When I use the qrcodestream component like this everything works well.
but when I select a specific camera with the constraints I can switch camera but all the logic doesn't work anymore
in script setup I get the devices like this:
I add
await navigator.mediaDevices.getUserMedia({video: true});
bc without it I don't get the devices on safari.The text was updated successfully, but these errors were encountered: