Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Torch not working #291

Open
georgggg opened this issue Sep 21, 2022 · 4 comments
Open

Torch not working #291

georgggg opened this issue Sep 21, 2022 · 4 comments

Comments

@georgggg
Copy link

georgggg commented Sep 21, 2022

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?

@danielmachado99
Copy link

same issue . I have tried

constraints={{ facingMode: "environment", advanced: [{ torch: true }] }}

but it doesn't work

@geeekgod
Copy link

geeekgod commented Jan 9, 2023

Is there any update on this? I'm facing the same issue

@Webbwhite98
Copy link

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.

@geeekgod
Copy link

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants