You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to have the default camera set as the back camera, however I've been struggling with getting it to work. Trying to using [ facingMode: "environment" ] just doesn't seem to work. Here's my current setup:
docReady(function() {
var resultContainer = document.getElementById('qr-reader-results');
var lastResult, countResults = 0;
function onScanSuccess(decodedText, decodedResult) {
if (decodedText !== lastResult) {
++countResults;
lastResult = decodedText;
document.getElementById("barcodeScanInput").value = decodedText;
}
}
var html5QrcodeScanner = new Html5QrcodeScanner(
"qr-reader", {
fps: 10,
qrbox: 250,
rememberLastUsedCamera: true
});
html5QrcodeScanner.render(onScanSuccess);
});
Hopefully someone can tell me how I would correctly implement the facingMode to this code. Thanks in advance.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello there,
I want to have the default camera set as the back camera, however I've been struggling with getting it to work. Trying to using [ facingMode: "environment" ] just doesn't seem to work. Here's my current setup:
Hopefully someone can tell me how I would correctly implement the facingMode to this code. Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions