Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

164
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!