gruhn / vue-qrcode-reader

A set of Vue.js components for detecting and decoding QR codes.
https://gruhn.github.io/vue-qrcode-reader
MIT License
2.03k stars 330 forks source link

fix: scanner breaks after constraint update #417

Closed gruhn closed 4 months ago

gruhn commented 4 months ago

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

netlify[bot] commented 4 months ago

Deploy Preview for vue-qrcode-reader ready!

Name Link
Latest commit 5be49cf60b92c75ef84b3a3c20be38f7a596f9ce
Latest deploy log https://app.netlify.com/sites/vue-qrcode-reader/deploys/65c40799b443640008588e53
Deploy Preview https://deploy-preview-417--vue-qrcode-reader.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

github-actions[bot] commented 4 months ago

:tada: This PR is included in version 5.5.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket: