zxing-js / browser

ZXing for JS's browser layer with decoding implementations for browser.
MIT License
213 stars 43 forks source link

track.getCapabilities is not available on FireFox. #72

Open atuttle opened 2 years ago

atuttle commented 2 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:

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.

Aspyryan commented 2 years ago

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

gregg-cbs commented 2 months ago

Yeah still getting this error on firefox, it does not seem to affect functionality: image