dwa012/html5-qrcode

How to choose camera?

shinjo77 opened this issue · 2 comments

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?

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") } };

Where would this fit into this example?