Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Turn on / off mobile flashlight from a web browser

I know there is a way to turn on front / rear camera but in my case I was wondering if there was a way to toggle on and off the camera flashlight from a web browser.

like image 361
Daniele Pais Avatar asked Dec 21 '17 09:12

Daniele Pais


1 Answers

I have found out why the solution suggested by @Angel Politis was not working for me and it has to do with SSL protected page. In essence I have visited the other link as suggested and copied the script but it did not work when I had upload it to my server which is not using the HTTPS protocol. Howwever, I have tried on a different server, (HTTPS), and it works flawlessly.

Many thanks all.

like image 178
Daniele Pais Avatar answered Oct 24 '22 00:10

Daniele Pais