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

camera fails with unhandled promise when used from two browsers

Open pmcquay opened this issue 2 years ago • 0 comments

Cameras cannot be used more than once, so an error is thrown when I use a camera from firefox and then from chrome (in your demo)

This is a silly use case, but it does generate an error and should be fixed.

The easiest way to sort this out I think is to return the promise from setCamera. That way I can handle it gracefully if setCamera fails. Alternately when listing cameras, either do not return cameras that are in use (not sure this is possible) or return an in use flag (again not sure).

pmcquay avatar Mar 30 '22 18:03 pmcquay