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

iPhone 14 Pro Max's rear camera is not reading the barcode #99

Closed
Tesfaye-Eshetie opened this issue Jan 19, 2023 · 6 comments
Closed

iPhone 14 Pro Max's rear camera is not reading the barcode #99

Tesfaye-Eshetie opened this issue Jan 19, 2023 · 6 comments

Comments

@Tesfaye-Eshetie
Copy link

I have a problem with the iPhone 14 Pro Max's rear camera; it is not focusing to read the barcode, but the front camera is working just fine. I have a user report about this; are there any solutions? I used the "dynamsoft-javascript-barcode" version 9.6.0 for building the app.

@Keillion
Copy link
Contributor

Sorry for the late reply due to my vacation.

Safari of iPhone does not provide a focus API, so we always rely on the default behavior of the browser.

Most of the inability to focus is because the camera is too close to the object. You can use the region API to guide the user to place the target at an appropriate distance.

When you set a region, there will be a rectangle on the canvas cover the video.

@Tesfaye-Eshetie
Copy link
Author

@Keillion Thank you very much. My question is this: I have a PWA app that uses a Dynamsoft Barcode Reader. And the Dynamsoft Barcode Reader works in every iPhone except the iPhone 14 Pro Max's rear camera. I've also configured the region API. In addition, it is not reading on the "https://demo.dynamsoft.com/barcode-reader-js/common-oned-twod.html" demo using the same phone.

@Keillion
Copy link
Contributor

@Tesfaye-Eshetie

Only iPhone 14 Pro Max's rear? Strange.

I'll go to apple store to have a test.

@Keillion
Copy link
Contributor

I reproduced the issue on an iPhone 14 Pro Max. And I confirmed that Safari does not open new focus-related APIs.

I googled this issue and found that it is a common phenomenon and is an issue introduced with newer versions of iPhone/iOS.

You can use singleFrameMode as a fallback to alleviate this problem.
e.g.
code: https://github.com/dynamsoft-rd-0/dbrjs-mass-samples/blob/master/not-focus-so-single-frame-mode.html
run: https://dynamsoft-rd-0.github.io/dbrjs-mass-samples/not-focus-so-single-frame-mode.html

@Tesfaye-Eshetie
Copy link
Author

Thank you for your response and assistance.

@Keillion
Copy link
Contributor

In dbrjs v9.6.20, the logic of selecting the camera in the iOS environment has been changed. Normal lenses are now preferred over wide-angle lenses.

After testing, it works well in the latest system of iphone 14 pro max.

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

2 participants