capacitor-community / camera-preview

Capacitor plugin that allows camera interaction from HTML code
MIT License
186 stars 156 forks source link

Support orientation change #107

Open johnbyrne7 opened 3 years ago

johnbyrne7 commented 3 years ago

Managing orientation change is not natively supported. When device orientation changes, the preview size does not change. can that be added?

Alternatively, can you provide a preview restart() method that can be used to restart the preview, when my app detect orientation change? Doing a restart with stop(), start() is a bit complex, and I've run into null pointer issue

JRamQATestGal commented 2 years ago

How does one use this option? I don't see this option listed in CameraPreviewOption in definition.d.ts? -Thanks

ryaa commented 2 years ago

This should be supported when these PRs are merged - https://github.com/capacitor-community/camera-preview/pull/235 and https://github.com/capacitor-community/camera-preview/pull/238 (those are related to https://github.com/capacitor-community/camera-preview/issues/232 and https://github.com/capacitor-community/camera-preview/issues/93 subsequently).

Can someone please test installing as described here https://github.com/capacitor-community/camera-preview/issues/93#issuecomment-1190518846 and let me know if these changes enable orientation change support? Thank you