-
Notifications
You must be signed in to change notification settings - Fork 105
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
Can't set default camera to rear camera #59
Comments
Hi @sinh-idnow, Thanks for raising this. Instead of specifying facingMode:‘environment‘, have you tried using the more advanced properties of ConstraintDOMString? https://developer.mozilla.org/en-US/docs/Web/API/ConstrainDOMString Can you try using the ‚ideal‘ property of it? Also what browser are you using? Are you trying it on a laptop/desktop/phone? What exactly is the result you‘re seeing? Please provide some details so that I can try to reproduce the issue. Thanks! |
Hi @sinh-idnow, I was able to reproduce the issue. I fixed a glitch where user provided video constraints were not applied properly under some circumstances. The issue appeared just on some devices and had to do with the amount of information the respective device/browser revealed about the available webcams. I was able to control the facingMode with the property you described. However I didn't use In case you still encounter any issues, feel free to open a new issue here. Cheers. |
I want to set rear camera as default camera when user access my web via their phone. I try to set facingMode in videoOption, follow description from this page:
But there are nothing happen :(. Now, I try to switch camera base on
MediaDeviceInfo.label
but this is not good solution because we should not base on label rule (havefront
orback
word inside label)My question is: do we have any official way to get rear camera? I think this requirement every popular for mobile webapp
Thank you for supporting
The text was updated successfully, but these errors were encountered: