2

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?

1

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.