html5 qr code scanner not work in back camera in mobile browser That is, when we open the phone in the browser, the front camera is activated
<div class="container">
<form>
<div id="reader" style="width:100%">
</div>
</form>
<div id="qr-reader-results"></div>
</div>
in js file
const html5QrCode = new Html5Qrcode("reader");
const qrCodeSuccessCallback = (decodedText, decodedResult) => {
/* handle success */
};
const config = { fps: 10, qrbox: { width: 250, height: 250 } };
html5QrCode.start({ facingMode: "environment" }, config, qrCodeSuccessCallback);