Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

409
Vistas
Uncaught TypeError: html5QrCode.getCameras is not a function

I am using HTML5QrCode and the setup is fine and is working good untill I decided to check if the device have camera OR not. I have checked the docs and follow the code but I am getting the 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");
    });
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda