-
Notifications
You must be signed in to change notification settings - Fork 864
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
Orientation Change Scanner Bug #283
Comments
How did you get the scanner to work in portrait? No matter what, it only scans in landscape. iOS 15 seems to have changed something. |
@yuresko is the basis of your code the same as mine or different? Could I see what you're doing? |
This is how I'm calling it in the html...and it's using instascan.min.js from the releases
|
@yuresko you've got a few differences in your code compared to my code. I am not using the instascan.min.js from the releases. I switched to one I found in the forums that I have attached. |
Ahh gotchya...I tried yours and it did the same thing. No portrait, only landscape. Thanks for your help, will keep digging. |
@yuresko here's a css workaround I figured out. CSS ` HTML |
@RileyIsOnGitHub https://github.com/huangsong/instascan/tree/master/docs there is my test code. it work well on my iphone7p 15.2 and pixel3 android 12 |
not working after i click this url sir |
|
Hello, Instascan is awesome and I'm only having one problem. Rotating a phone and changing the orientation from the original loaded orientation to the second orientation, makes the scanner not work. The scanner will not find the QR code in the second orientation. If you go back to the original first orientation it will work. The starting original orientation does not matter whether it's Portrait or Landscape. This is happening for us on all mobile phone devices including the last couple Android OS's and iOS 14.5/15.1. I have tried using screen.orientation.addEventListener to resolve the issue, but it makes no difference.
EXAMPLE
Page is loaded in Portrait mode and successfully scans. Rotate the phone to Landscape mode and camera does not scan anything.
Page is loaded in Landscape mode and successfully scans. Rotate the phone to Portrait mode and camera does not scan anything.
SAMPLE CODE
I have tried using screen.orientation.addEventListener to resolve the issue, but it makes no difference.
Please let me know if you need me to provide anything else.
The text was updated successfully, but these errors were encountered: