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

166
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
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