zerforschung / schnelltesttest.de

https://schnelltesttest.de
GNU Affero General Public License v3.0
229 stars 19 forks source link

dont show flashlight button on unsupported devices #65

Open pajowu opened 2 years ago

pajowu commented 2 years ago

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:

Known non-working:

m0nac0 commented 2 years ago

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).