capacitor-community / barcode-scanner

A fast and efficient (QR) barcode scanner for Capacitor
MIT License
437 stars 167 forks source link

Issue with Camera Area Shifting in Landscape Orientation on Initial Opening #298

Open bulletbrand opened 7 months ago

bulletbrand commented 7 months ago

Describe the bug When using @capacitor-community/barcode-scanner, I encounter the following issue: if the camera is initially open in landscape orientation, opening the scanner causes the camera area to shift to the left and extend beyond the screen. However, if the camera is initially open in portrait orientation or if the scanner is opened after the device has been switched to landscape orientation, everything works fine.

To Reproduce 1)Open the application. 2)Activate the camera directly in landscape mode. 3)Observe the shift or issue in the camera viewport.

Alternatively: 1)Open the application. 2)Activate the camera in portrait mode. 3)Perform any necessary actions or scans. 4)Switch to landscape mode. 5)Observe that the camera adjusts correctly without any issues.

Expected behavior Everything is adjusted and works well.

Screenshots

expected: photo_2024-01-31 12 11 19

Current: photo_2024-01-31 12 11 22

Video: https://github.com/capacitor-community/barcode-scanner/assets/32958698/d33a1295-8f0a-4c69-a915-28d89a318b05

Version 4.0.1

Smartphone: