ngx-scanner icon indicating copy to clipboard operation
ngx-scanner copied to clipboard

Promise not handled when device is not capable of streaming (DOMException: Could not start video source)

Open rafaellyra opened this issue 5 years ago • 2 comments

Describe the bug If the default selected device is not capable of streaming the Promise error is not being handled, if a device is not capable of scanning then an error should be emitted from the component.

To Reproduce Steps to reproduce the behaviour:

  1. Go to 'https://zxing-js.github.io/ngx-scanner/' with a device that is not capable of streaming.
  2. See the error message: "DOMException: Could not start video source"

Expected behaviour The component should handle the promise error

Screenshots stream_fail

Desktop (please complete the following information):

  • OS: Windows
  • Browser Chrome
  • Version 85

rafaellyra avatar Sep 19 '20 10:09 rafaellyra

https://zxing-js.github.io/ngx-scanner/' does not work on Samsung Galaxy 20 Ultra / Samsung Note 10 pluss. zxing scanner component: NotReadableError DOMException: Could not start video source ( works fine on pc having webcam)

mnesser avatar Feb 08 '21 13:02 mnesser

The component should handle the promise error

The component provides a way for the developer to handle it the way it wants, it's not a bug with the library, but with the demo that did not handled it.

odahcam avatar Feb 09 '21 03:02 odahcam