Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

412
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda