-
Notifications
You must be signed in to change notification settings - Fork 560
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Camera View Orientation Bug? #216
Comments
I am still seeing this bug as well (iPad Pro, iOS 13). Regardless of whether an app is launched in landscape or portrait, the scanner opens in portrait. |
This issue is stale because it has been open for 30 days with no activity. Remove the Stale label or comment or this will be closed in 10 days. |
Just bumping to add interest - Im of firm belief this is actually an issue at the iOS framework level, other libraries and scanning implementations have users reporting the same issue. I first discovered it using WeScan. I experience the bug on an iPad Air iOS 12.4.8, there are other iOS devices not experiencing the bug. Is there any insight into its remedy here? |
We have not yet found the time to dive in. In those other projects, have you found an example with a fix too? That could help speed up fixing this. |
My customers are seeing this bug as well on all iPad devices. Any way to make this a priority fix? |
@ethanwa unfortunately, we're not actively developing WeScan at this moment. We're happy to receive any contributions and review accordingly. |
Has anyone been able to fix this yet? My app only works in landscape and the camera pops up in portrait orientation. |
@AvdLee Would just changing this be able to fix our issues?
|
I've not tried that out but to me, that would disable landscape completely, wouldn't it? |
@AvdLee I am not sure. Is anyone able to take a look at a fix for this? |
Currently, WeScan is not on our list of priorities. We're open for contributions and aim to review PRs within 1 working day. So feel free to apply a fix 🙂 |
I also ran into this. So I tried to dig into it, and it's a bit of a rabbit hole. Just returning .all from supportedInterfaceOrientations doesn't do much. I then was able to correct the video preview in CameraScannerViewController by updating the orientation in viewDidLayoutSubviews, which fixed the video, but the rectangle overlays were still wrong. To fix that you'd have to recalculate the quad transforms. Once the preview is fixed, you'd then have to update the capture code to ensure the actual images are properly processed in the right orientation. The whole package seems to be designed for portrait mode, so there is no isolated surgical fix. I looked around for other example code, and all examples I could find, including from Apple, do not handle landscape mode properly for any of their VN examples with previews. The last comment here was from 2 years ago, so if anyone else solved this in the interim I'm interested in what they did. |
Hi, Any update on this issue? |
I got this to work, but improvements to the code are welcome. First, at the top of the
Next, you'll need to listen for orientation changes and use those to rotate the video feed manually. You can use the following modification to viewDidLayoutSubviews, plus a helper function:
Now we'll deal with the quad layer, which is also out of sync. Go to the function on line 182,
And update the rotationTransform assignment later in the function to use your new
Finally, there's ensuring that the image is oriented correctly when you go to edit it. For this, go to the
Let me know if anyone has any questions. If demand is high enough I can create a PR as well. |
If i change the Orientation on the iPad (iOS 11) its rotating the Camera View.
After its rotated the Axis in the Camera View are swapped. When i turn the iPad to the left the camera view moves the visible camera output to the bottom.
Is this a bug or could u give me any advice to fix this behaviour?
Its mentioned in #76 and #185 and it's still a problem or am i missing something?
The text was updated successfully, but these errors were encountered: