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

165
Visualizações
how to active back camera

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);
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

There can be an permission issue. Or you can try to list all cameras for debug purposes by using the static method getCameras(). Maybe the back camera is not detected?


// This method will trigger user permissions
Html5Qrcode.getCameras().then(devices => {
  /**
   * devices would be an array of objects of type:
   * { id: "id", label: "label" }
   */
  if (devices && devices.length) {
    var cameraId = devices[0].id;
    // .. use this to start scanning or just log devices to see
    // which cameras are deteceted.
  }
}).catch(err => {
  // handle err
});


For more information check following links:

  • Github README.md: Start Scanning
  • Blog: HTML5 QR Code scanning with javascript - launched v1.0.1
about 4 years ago · Juan Pablo Isaza Relatório
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