Open jtkeyva opened 1 year ago
Hello, This has just been made by our awesome @istornz You can test it on master branch directly.
It's done on iOS, missing the Android part.
@istornz amazing work!
Is this possible on Android? I believe I saw another thread that maybe questioned whether it was possible or not.
@jamesdixon Thanks, I think it's possible but complicated, any advise @apalala-dev ?
@jamesdixon It should be possible but for some reason I am only getting 2 camera ids (one for front and one for back camera) whatever I do.
Same goes for CameraX extensions (night mode, HDR...). In theory, the code is ready but my code or CameraX API is broken atm 😅
I am trying with devices from Firebase Test Lab since my own is getting old (Xiaomi Mi 9T), but even a Pixel 7 Pro doesn't return more than 2 cameras and can't use CameraX extensions.
We'll let you know if we figure it out!
On Android, there is a concept of "logical camera" and "physical camera". A logical camera can use multiple physical camera.
Most of the time, it seems that there is only one logical camera for each side of the phone and I didn't find a way to directly use the physical camera with CameraX.
However, it is still possible to switch between several cameras with different capabilities by setting a specific zoom to them. On a Pixel 7 Pro for instance, I was able to get the wide angle camera (x0.6) by setting a zoom value between 0.0 and 0.4 (included). I got back to the normal sensor (x1) starting at 0.5 value and even could be able to achieve a x30 when setting the zoom value to 1.0 (PIxel 7 Pro has a telephoto sensor that allows x30 zoom).
Thanks all!
Proposal
Include the option to cycle through all available camera/lenses.
iPhone Pro has 3 different lenses / cameras. I recall using a Flutter app/package that allowed you to cycle through all the lenses which included the wide-angle the regular as well as the zoom lens. It was a while back but I think it was just a matter of allowing 4 cameras in the list rather than 2.
Any plans for this?
Thanks