html5-qrcode icon indicating copy to clipboard operation
html5-qrcode copied to clipboard

How to select the other camera on the rear side of an iPhone 13

Open henrikdahl8240 opened this issue 4 years ago • 8 comments

How to select the other camera on the rear side of an iPhone 13?

Html5Qrcode.getCameras() reports, that there is only one camere at the front and one at the rear. There are however two cameras on the rear and one at the front.

So, how to select the other rear camera than the usual one?

Is it possible to make the selected camera to automatically focus?

henrikdahl8240 avatar Jan 28 '22 21:01 henrikdahl8240

This library operates on top of the Camera APIs in web standards and the browser is responsible to return the cameras. The API & scanner seems to be requesting the cameras in standard fashion. I don't think we can request the other cameras from the browser.

Closing this as out of scope bug for the library.

mebjas avatar Feb 19 '22 10:02 mebjas

Scandit can "see" all cameras and it generally works much, much better. It would be very nice to get the same benefits with this open source project.

henrikdahl8240 avatar Feb 19 '22 10:02 henrikdahl8240

Scandit can "see" all cameras and it generally works much, much better. It would be very nice to get the same benefits with this open source project.

Ah, very interesting!! Is there somewhere I can try it out?

mebjas avatar Feb 19 '22 10:02 mebjas

Yes, go to: https://docs.scandit.com/stable/web/

Click the link here: Try out our live demo here.

I have tried it on my iPhone 13. Honestly, it works breathtakingly well, simply completely awesome.

What do you think, after you have tried it?

If you google around, you may see, that other's are also having the camera issue, and there are references to some publicly available code from the Scandit SDK, which shows how to get information about all the cameras. It seems like the issue is to be more specific on capabilities when querying for cameras.

henrikdahl8240 avatar Feb 19 '22 10:02 henrikdahl8240

Thanks I'll look into this.

mebjas avatar Feb 19 '22 10:02 mebjas

You will be able to see, that it can also easily scan non-flat barcodes, e.g. on bottles, tubes of hand lotion etc.

henrikdahl8240 avatar Feb 19 '22 11:02 henrikdahl8240

Just tried scandit on iphone11. It is remarkably good! Scanned all my problematic barcodes - small, faded, dirty and all from a distance. I have no idea how they do it!

devantic avatar May 11 '22 05:05 devantic

Just found this open source AI? lib too:

https://github.com/w-okada/image-analyze-workers/tree/master/012_barcode-scanner-worker-js

devantic avatar May 11 '22 05:05 devantic