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

404
Views
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
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!