html5-qrcode
html5-qrcode copied to clipboard
How to choose camera?
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?