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

iOS user vs environment camera #9

Open
VincentGillot opened this issue Jul 13, 2021 · 6 comments
Open

iOS user vs environment camera #9

VincentGillot opened this issue Jul 13, 2021 · 6 comments

Comments

@VincentGillot
Copy link

This is working nice thank you! But I am encountering a problem with the facingMode. On iOS it always takes the user camera first, even setting the facingMode to environment, and then when closing the component and reopening it finally takes the environment camera. Any idea what could cause that? I tried many things to no effect.

@KhaosArbiter
Copy link
Owner

There was a similar issue with Android (which led me to fork this). It might be similar, I'll take a look when I can. Feel free however to submit a pull request if you can fix it.

@VincentGillot
Copy link
Author

Only workaround at the moment is a toggle button. Boolean switches the user and environment strings. So the prop itself is working but for some reason it's like the first load doesn't detect the back camera. Maybe a racing issue? No idea.

@KhaosArbiter
Copy link
Owner

What version of iOS are you testing against

@VincentGillot
Copy link
Author

Happens on all from at least 8 I think

@TTomasik
Copy link

I have a same problem in my samsung note 10 :(

@aksong-nom2
Copy link

I have the same problem on my Samsung S21 Ultra (Android 11). On initial startup, the reader starts in user view, regardless of the how the "facingMode" prop is set. As noted above, I tried adding a toggle to switch to "environment". On the first toggle attempt, I get the following error, "Could not start video source".

Long story short, a lousy workaround for now is to set the initial mode to "user", then onLoad, change the mode to "environment". The downside is that the reader window starts w/the front facing camera and then switches to the rear-facing a split second later. Would certainly like to see this issue addressed...

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