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

How to choose camera? #44

Open
shinjo77 opened this issue Aug 21, 2016 · 2 comments
Open

How to choose camera? #44

shinjo77 opened this issue Aug 21, 2016 · 2 comments

Comments

@shinjo77
Copy link

Hi

Is there way to control which camera to use?
From my laptop - chrome it uses back camera, while my android phone - chrome uses front camera.
is this more of browser issue?

@chiefcll
Copy link

https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia

var front = false;
document.getElementById('flip-button').onclick = function() { front = !front; };

var constraints = { video: { facingMode: (front? "user" : "environment") } };

@Fever905
Copy link

Where would this fit into this example?

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

3 participants