Estoy usando HTML5QrCode y la configuración está bien y funciona bien hasta que decidí verificar si el dispositivo tiene cámara O no. Revisé los documentos y sigo el código, pero recibo el error
Uncaught TypeError: html5QrCode.getCameras is not a function <script src="/js/html5-qrcode.min.js"></script> var html5QrCode = new Html5Qrcode("scanner-container"); const qrCodeSuccessCallback = (decodedText, decodedResult) => { html5QrCode.stop().then((ignore) => { // QR Code scanning is stopped. }).catch((err) => { console.log(err); }); }; const config = { fps: 10, qrbox: 250 }; html5QrCode.getCameras().then(devices => { if($(".scan-dom").hasClass("notVisible")){ $(".scan-dom").removeClass("notVisible"); } html5QrCode.start({ facingMode: "environment" }, config, qrCodeSuccessCallback); }).catch(err => { console.log("No Camera Found"); if(!$(".scan-dom").hasClass("notVisible")){ $(".scan-dom").addClass("notVisible"); } $(".noCameraMessage").removeClass("hide"); });