browser icon indicating copy to clipboard operation
browser copied to clipboard

track.getCapabilities is not available on FireFox.

Open atuttle opened this issue 4 years ago • 2 comments

When attempting to use this library (via react-qr-reader) in Firefox, the error track.getCapabilities is not a function is thrown by this line:

https://github.com/zxing-js/browser/blob/eaefab44679fbcd4eb579f888905b6712018276f/src/readers/BrowserCodeReader.ts#L94

In my testing, track.getCapabilities is defined in Chrome, but not Firefox. For my purposes, it would be sufficient if the torch feature was assumed to be unavailable if getCapabilities is not defined.

atuttle avatar Oct 25 '21 18:10 atuttle

Yea could we get an error thrown that we could catch and have proper handling for?

Aspyryan avatar Dec 12 '21 16:12 Aspyryan