html5-qrcode
html5-qrcode copied to clipboard
Camera cannot focus the QR code in HuaWei Device
When open the scanner, the camera cannot focus the QR code.
- Device 1: Huawei nova 5T
- Device 2: Huawei kirin 980
Is there any setting or config i can try?
focusMode: "continuous"
focusMode: "continuous"
html5QrCode .start( camera, config,
is this config put into camera camera setting or config object? I tested both, it doesn't work.
Also i tested the html5QrCode.applyVideoConstraints({focusMode: "continuous"}) seems not working too.
I use it it in the scanner config where you put all settings like qrbox etc...
here is my whole config
{fps: 8, qrbox: {width: 250, height: 250}, rememberLastUsedCamera: true, disableFlip: true, aspectRatio: 1, facingMode: {exact: "environment"}, focusMode: "continuous", supportedScanTypes: [Html5QrcodeScanType.SCAN_TYPE_CAMERA,Html5QrcodeScanType.SCAN_TYPE_FILE] , formatsToSupport: [Html5QrcodeSupportedFormats.QR_CODE], showTorchButtonIfSupported: true, useBarCodeDetectorIfSupported: true, showZoomSliderIfSupported: true, defaultZoomValueIfSupported: 2}
I use it it in the scanner config where you put all settings like qrbox etc... here is my whole config
{fps: 8, qrbox: {width: 250, height: 250}, rememberLastUsedCamera: true, disableFlip: true, aspectRatio: 1, facingMode: {exact: "environment"}, focusMode: "continuous", supportedScanTypes: [Html5QrcodeScanType.SCAN_TYPE_CAMERA,Html5QrcodeScanType.SCAN_TYPE_FILE] , formatsToSupport: [Html5QrcodeSupportedFormats.QR_CODE], showTorchButtonIfSupported: true, useBarCodeDetectorIfSupported: true, showZoomSliderIfSupported: true, defaultZoomValueIfSupported: 2}
@ROBERT-MCDOWELL
showZoomSliderIfSupported and defaultZoomValueIfSupported options are not working when we use html5QrCode.start()
.
It is working only with html5QrcodeScanner.render()
Does above options working for you with html5QrCode.start()
?
I use only html5QrcodeScanner, which is built on top of the html5Qrcode class so you should find the equivalent in the docs
Hello, have you resolved Huawei's inability to focus? I have also encountered this problem. May I ask how you can solve it
I am using iphone 14pro camera to scan the UPC-A barcode for products scan.
However, I am getting blurry image while it is closer to the camera (kind of macro mode). Is it a persistent issue of camera being not focused in closed distance?
Is there any resolution coming on this?
Hey guys, you can try modifying the resolution to make it clear.
html5Qrcode.start( { facingMode: "environment", }, { aspectRatio: 1.777778, // 16:9 focusMode: "continuous", fps: 15, videoConstraints: { facingMode: 'environment', width: 9999, // It may be useful!! }, qrbox: { width: 280, height: 280, }, },