The following code turns the torch/flash on or off using JavaScript inside browser.
VideoStream derived from navigator.mediaDevices.getUserMedia
VideoStream.applyConstraints({ advanced: [{ torch: state }]
});
//Where VideoStream points to the camera stream/track, state = true (on) or false (off)
I have tested and works perfectly on Android, but on latest iOS it doesnt work. Can anyone tell me if there is a workaround/alternative, or is this a "live with it"?