zxing-js / ngx-scanner

Angular QR code, Barcode, DataMatrix, scanner component using ZXing.
https://zxing-js.github.io/ngx-scanner/
MIT License
640 stars 228 forks source link

In Safari browsers, NotAllowedError stands when denying camera access once and then allowing it #396

Open mocanapena opened 3 years ago

mocanapena commented 3 years ago

Describe the bug When user is prompted with the window in Safari browsers to allow or not the camera access, if we click 'Allow' everything works great, but if we click in 'Not allow' and then we click in 'Allow', a console error appears notifying the user the following:

NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.

NOTE: The camera seems to be activated as the green light associated to it (mac users) is ON.

To Reproduce

https://stackblitz.com/edit/zxing-scanner-not-allowed

  1. Deny access to camera
  2. Click in Try again button
  3. Camera is activated, but console error is raised and no video is shown in the screen

Expected behavior Camera stream should be visible and console errors should be clean

Screenshots

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context In Chrome is working as expected

babiibra commented 3 years ago

i have the same issue, any explanation or solution for this bug ?