browser
browser copied to clipboard
track.getCapabilities is not available on FireFox.
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.
Yea could we get an error thrown that we could catch and have proper handling for?