react-qr-reader
react-qr-reader copied to clipboard
Torch not working
I am using the QrReader component successfully, but the torch (environment camera light) is not turning on when configured using the "constraints" prop of the component (tested Android and iOS devices). I am defining such property as follows:
constraints={{'torch' : true, facingMode: 'environment'}}
According to https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints the torch property should be a boolean value. Is this MediaTrack Constraint actually being taken care of in this component?
same issue . I have tried
constraints={{ facingMode: "environment", advanced: [{ torch: true }] }}
but it doesn't work
Is there any update on this? I'm facing the same issue
Is there any update on this? I'm facing the same issue
I've been doing research on this for about a week. I don't believe its possible with IOS from what I've read due to apple.
@Webbwhite98
According to my knowledge of MediaTrackConstraints torch
property is not available in video tracks.
I feel that's the reason we can't pass the torch
as props in the QR reader component.