'Turn flash/LEN on or off using JavaScript - works on Android, not iOS

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"?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source