I am developing a webrtc project with peerjs. when the project is opened in Android Chrome Browser, I want to use back camera. I don't find information about this feature. How can I proceed?
Asked
Active
Viewed 4,619 times
2
-
Possible duplicate of [GetUserMedia - facingmode](http://stackoverflow.com/questions/32086122/getusermedia-facingmode) – jib May 21 '16 at 03:53
1 Answers
2
I don't have experience with peerjs but with "vanilla" WebRTC you can pass constraints
to getUserMedia
for example:
To require the rear camera, use: { audio: true, video: { facingMode: { exact: "environment" } } }
https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia
This documentation is for Firefox, but on the bottom of the page it says:
Chrome uses an outdated constraint syntax, but the syntax described here is available through the adapter.js polyfill.

wpp
- 7,093
- 4
- 33
- 65