ngx-scanner
ngx-scanner copied to clipboard
Firefox - TypeError: track.getCapabilities is not a function
Describe the bug Using camera on Dev Tools appear TypeError: track.getCapabilities is not a function but everything works seemingly fine
Angular CLI
@angular-devkit/architect 0.1202.15 @angular-devkit/build-angular 12.2.15 @angular-devkit/core 12.2.15 @angular-devkit/schematics 12.2.15 @angular/cdk 12.2.13 @angular/material 12.2.13 @schematics/angular 12.2.15 rxjs 6.6.7 typescript 4.3.5
@zxing/ngx-scanner version
"@zxing/browser": "0.0.10", "@zxing/library": "0.19.1", "@zxing/ngx-scanner": "3.4.0",
To Reproduce Use the camera
Expected behavior No errors in devtools
Screenshots
Desktop (please complete the following information):
- OS: Windows 10
- Browser Firefox
- Version 96.0.1 (64 bit)
Additional context Add any other context about the problem here.
Hello, any news on this please ?
That's quite annoying to get this issue logged in sentry, even if everything seems to work as expected. I can help if needed, just let me know :)
Thank you !
Not a maintainer of zxing-js, but I also came across this.
Here in @zxing-js/browser is where the console error is emitted. There should be a warning in the console immediately after the error. It states:
Your browser may be not fully compatible with WebRTC and/or ImageCapture specs. Torch will not be available.
Seems like this function doesn't handle FF not supporting the getCapabilities function, but you can ignore the error if you don't use a flashlight/torch.