mebjas / html5-qrcode

A cross platform HTML5 QR code reader. See end to end implementation at: https://scanapp.org
https://qrcode.minhazav.dev
Apache License 2.0
4.7k stars 935 forks source link

Compatibility - Browser - Firefox wont show torch swich button #762

Open mochfathurrozi opened 1 year ago

mochfathurrozi commented 1 year ago

Describe the bug A clear and concise description of what the bug is.

Describe the browser:

Screenshots firefox firefox chrome chrome

wombatstampede commented 1 year ago

Check the result of: navigator.mediaDevices.getSupportedConstraints() or getRunningTrackCapabilities() during scan.

Some browsers (especially all iOS Safari) do not support the torch. In that case, you won't find the key "torch" in the result of said functions. If "torch" is missing or "false" then there's nothing html5-qrcode can do about it (AFAIK).

ROBERT-MCDOWELL commented 1 year ago

@wombatstampede indeed, if the user cannot see the Torch, or even the zoom slider it means that the browser or OS are not compatible or does not allow access to these functions.