Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camera cannot focus the QR code in HuaWei Device #690

Open
Tomme-wong opened this issue Feb 7, 2023 · 6 comments
Open

Camera cannot focus the QR code in HuaWei Device #690

Tomme-wong opened this issue Feb 7, 2023 · 6 comments

Comments

@Tomme-wong
Copy link

When open the scanner, the camera cannot focus the QR code.

issue

  • Device 1: Huawei nova 5T
  • Device 2: Huawei kirin 980

Is there any setting or config i can try?

@ROBERT-MCDOWELL
Copy link

focusMode: "continuous"

@Tomme-wong
Copy link
Author

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.

@ROBERT-MCDOWELL
Copy link

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}

@Topiya
Copy link

Topiya commented Aug 9, 2023

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() ?

@ROBERT-MCDOWELL
Copy link

I use only html5QrcodeScanner, which is built on top of the html5Qrcode class so you should find the equivalent in the docs

@OrchardRX
Copy link

Hello, have you resolved Huawei's inability to focus? I have also encountered this problem. May I ask how you can solve it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants