WeScan
WeScan copied to clipboard
Camera View Orientation Bug?
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?
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?
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?
override public var supportedInterfaceOrientations: UIInterfaceOrientationMask {
return .portrait
// can we change this to .landscape to change the orientation?
// Or is there more to this like having to change camera properties?
}
@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?
@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.