mebjas / html5-qrcode

A cross platform HTML5 QR code reader. See end to end implementation at: https://scanapp.org
https://qrcode.minhazav.dev
Apache License 2.0
4.74k stars 940 forks source link

Compatibility - [IOS 17.4.1] [Google Chrome] - Stuck on scanner #921

Open adityadees opened 2 months ago

adityadees commented 2 months ago

It's stuck on scanner pages, didn't get any response.

popet010 commented 2 months ago

![Uploading IMG_20240516_053626.jpg…]()

eelcol commented 1 month ago

I also don't get this to work on iOS:

const html5QrCode = new Html5Qrcode("reader");

const qrCodeSuccessCallback = (decodedText, decodedResult) => {
    document.getElementById("result").value = decodedText;
};

const config = {
    fps: 10,
    disableFlip: false,
    focusMode: "continuous",
    aspectRatio: 1,
    advanced: [{ zoom: 2.0 }],
    rememberLastUsedCamera: true,
    qrbox: { width: 400, height: 400 },
    videoConstraints: {
        width: {min: 1000, ideal: 1920},
        height: {min: 1000, ideal: 1080},
        facingMode: "environment",
    },
};

// If you want to prefer back camera
html5QrCode.start({}, config, qrCodeSuccessCallback).then(function () {
   html5QrCode.applyVideoConstraints({
       focusMode: "continuous",
       aspectRatio: 1,
       advanced: [{ zoom: 2.0 }],
   });
});