Open atuttle opened 3 years ago
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:
track.getCapabilities is not a function
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.
track.getCapabilities
getCapabilities
Yea could we get an error thrown that we could catch and have proper handling for?
Yeah still getting this error on firefox, it does not seem to affect functionality:
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 ifgetCapabilities
is not defined.