Closed AlaaElZein closed 7 years ago
Mobile mean iOS 11? found this: http://robporter.ca/safari-11/
no i am working on chrome on android, and the code works correctly in brfv4 but the mobile camera (samsung chrome) is opened as front cam. i need to open the rear cam in the code on brfv4
So you already tried
"facingMode": "environment"
for the camera constraint?
where should i add this variable? i searched in all the downloaded brfv4 project and there is no existed variable called facing mode in the js.
It's a webcam constraint.
In this file:
https://github.com/Tastenkunst/brfv4_javascript_examples/blob/master/js/utils/BRFv4SetupWebcam.js
line 28:
webcam.constraints = {video: {width: width, height: height, frameRate: fps}};
should be:
webcam.constraints = {video: {width: width, height: height, frameRate: fps, facingMode: "environment"}};
okayy it works fine now thank you very much
np
Hi, can easily this be dynamically changed? so the user can choose their camera?
Look into facingMode. Set the desired facingMode the first time and then have a toggle button that switches between environment and user.
https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints/facingMode
Hello, Can we open the rear camera in mobile in brfv4? Regards,