Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

iOS: Camera is locked in portraitmode even when device is in landscape #40

Closed
vesters opened this issue Jul 24, 2015 · 8 comments
Closed
Labels

Comments

@vesters
Copy link

vesters commented Jul 24, 2015

Seen on iPhone 5+6 and iPad 2. Others not tested.

On the iPad it seems about 30% of the screen is cut of (black).

img_3375

@wildabeast
Copy link
Collaborator

I seem to recall discussing this a while ago, and it seemed that the community deemed that this was the desired behaviour. The reasoning was that if the scanner responded to orientation changes, then it would be impossible to scan vertical barcodes. That said perhaps this should be configurable instead of locked one way or the other?

The cut off screen on the iPad certainly seems like a bug though.

@vesters
Copy link
Author

vesters commented Aug 5, 2015

I think making it configurable would be very nice.

I can see the problem with vertical codes - but especially when using the iPad on horizontal codes, it can seem more like a bug than a feature:-)

@derwaldgeist
Copy link

@maintainer:

On native iOS, both issues can be fixed, and code scanning works fine even if device orientation is rotated. All you have to do, is to set the videoOrientation of the capture connection. And you have to take care of the varying frame bounds on screen rotation, which are the reason for the black border the OP mentioned.

Please have a look here:
http://stackoverflow.com/questions/15075300/avcapturevideopreviewlayer-orientation-need-landscape

If you're interested, I could send you a complete implementation I've just done in Swift. I just came here to see if I could save some time by using Phonegap instead of implementing scanning natively. :-)

wildabeast pushed a commit to wildabeast/BarcodeScanner that referenced this issue Aug 11, 2015
+ phonegap/phonegap-plugin-barcodescanner#40
+ should be made run-time or compile-time configurable
@piersroberts
Copy link

@wildabeast is there any interest in completing this feature as a run-time switch and adding to other platforms? It'd be great to see this pulled in to the Phonegap build.

@sarangan12
Copy link
Collaborator

This should be fixed with the latest telerik code merge. Resolving this issue. If you still find this issue, please reopen it

@owq
Copy link

owq commented Jun 17, 2016

Issue seems to remain with c3bcd87.
However #171 fixes this.

@EddyVerbruggen
Copy link
Collaborator

Fixed in 5.0.1.

@lock
Copy link

lock bot commented Jun 8, 2018

This thread has been automatically locked.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

7 participants