1j01 / tracky-mouse

Mouse control via head tracking, as a cross platform desktop app and JS library. eViacam alternative.
https://trackymouse.js.org/
MIT License
25 stars 4 forks source link

Start/Stop button says "Stop" while camera isn't allowed #56

Open 1j01 opened 1 month ago

1j01 commented 1 month ago

In the web UI, if "Start enabled" is checked, and the page is reloaded, before camera permissions are granted, the toggle button is showing as "Stop (F9)", whereas it should show "Start (F9)", as it's not actually able to start without the camera. Or just "Start" if the keyboard shortcut doesn't allow it to prompt for the camera permission.

Does the "Start enabled" option make sense given the web's permissions model? Is the camera permission persistent, or can we request for it to be?

According to a 2016 StackOverflow answer:

  1. Localhost: In Localhost Chrome Browser asking permission only one time and Firefox every pageload.
  2. HTTPS: Both Browsers Chrome and Firefox asking permission only one time.

However, pressing F9 isn't working to activate the camera. Pressing the Start/Stop button with the keyboard (with space or enter, while the button is focused) does work.