Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: scanner breaks after constraint update
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
- Loading branch information