Ability to toggle camera and set a defaultOrientation#23
Ability to toggle camera and set a defaultOrientation#23sunragav wants to merge 2 commits intokalinjul:mainfrom
Conversation
…ting a default orientation so that the orientation looks correct when a capture session is started in iPad (which should be landscape, which becomes portrait sometimes). Updated the sample project accordingly.
|
@kalinjul @DevinDuricka Please review. |
Adding defaultOrientation parameter in the Scanner.jvm
|
Hey @sunragav thanks for your contribution! I'm not actually the owner of the project, so I will defer to @kalinjul for final approval. From what I can tell though, the code looks good. Unfortunately I don't have an iOS device or Mac to build/test. I might consider altering the class definition to instantiate the defaultOrientation as null. That way when people pull the updated library, they don't have to update their camera objects (unless they want to set a default orientation). Another item to consider - and I haven't researched this at all, so I'll be interested to hear what you think - is there a KMP way to capture the devices orientation? |
|
Thanks for your contribution! Also about orientation - right now it should use the device's orientation at initalization time, right? So i guess it shouldn't be necessary at all to pick orientation, but instead use the current device's orientation and update accordingly. I will also look into this when i find the time. |
Features Added: 1. Ability to toggle the camera front and back 2. Setting a default orientation so that the orientation looks correct when a capture session is started in iPad (which should be landscape, which becomes portrait sometimes). Updated the sample project accordingly.
Problem:
In iPad, when the app is in landscape mode, the orientation starts in portrait instead of landscape.
2025-05-25.04-35-53.mp4