Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dont show flashlight button on unsupported devices #65

Open
pajowu opened this issue Jan 30, 2022 · 1 comment · May be fixed by #67
Open

dont show flashlight button on unsupported devices #65

pajowu opened this issue Jan 30, 2022 · 1 comment · May be fixed by #67

Comments

@pajowu
Copy link
Member

pajowu commented Jan 30, 2022

the "torch" can only be activated on certain devices. we should only show the button on those.

I see three options:

  1. Enable it only on known working devices
  2. Disable it on known non-working devices
  3. Dynamically check if it can be enabled
    We should only show the button if there is at least on media track with torch: true

Known working:

  • Chrome on android

Known non-working:

  • Safari on iOS
@m0nac0
Copy link
Contributor

m0nac0 commented Jan 30, 2022

If we go for 1., I assume it would also work in most other Android browsers with the blink engine.

To add to the list, I think it won't work in any iOS browser (since all iOS browsers use Safari's rendering engine) and I know it doesn't work in Firefox on Android.

I also assume it won't work on any macOS device, or in Firefox on any OS.

I'm not sure if there are e.g. Windows tablets that'd also support the flashlight (possibly in Chrome, but probably not in Firefox).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants