Skip to content
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

On iPhone or iPad, only front camera #50

Open
numerique-mood opened this issue Jun 15, 2021 · 5 comments
Open

On iPhone or iPad, only front camera #50

numerique-mood opened this issue Jun 15, 2021 · 5 comments

Comments

@numerique-mood
Copy link

Hello !
First of all, many thanks for your incredible plugin! I discovered it and wanted to play with QR codes. But on the iPhone and iPad I only have the front camera (even if I choose the back camera). I am on Moodle 3.10.3 with the latest version of Treasure Hunt. It works with the front camera but it is not very practical.
Regards,
Sébastien

@juacas
Copy link
Owner

juacas commented Jun 16, 2021

Hi, thanks for your kind words.
Unfortunatelly, I don't have any Apple device to test that issue and I'll need some help for the community to solve this bug.
The problem seems to start in line

Instascan.Camera.getCameras().then(function (cameras) {
that completely relies on the instascan library.

Please, test with your iPhone the demo at: https://schmich.github.io/instascan/ and check if you can use both cameras of your device.

@numerique-mood
Copy link
Author

Hi, thanks for your feedback.
I just try the link in your previous post with my iPhone and it works like on my Moodle : it discovers the 2 cameras (front and back) but when I choose front or back it's always the front camera that I see. QR codes are recognized in the 2 ways.

@juacas
Copy link
Owner

juacas commented Jun 16, 2021

Je suis vraiment désolé. bitmoji

Can you repeat the same check using Chrome instead of Safari?
Nevertheless, I've marked this issue as "help wanted".

At least the QR functionality is usable although not confortably.

@numerique-mood
Copy link
Author

Thanks for you few words in French ! 👍
I just test on my iPhone with Chrome and Firefox and it doesn't change anything.
It's not a big problem as at least one camera works and can read the QR codes. Unfortunaly I'm just a Moodle user and not a developer, so I can't help you, I can only test and tell you what I see.

@LRequin
Copy link

LRequin commented Jul 18, 2022

Hi @juacas. I hope to find you well. Same issue for me and this is a deal (heart)breaker for me as the game would be played indoors and the activity MUST work on all platforms.
I looked at the library you use to scan the QR code "webqr.js". There is an open issue on their Github page: Doesnt work in Iphone devices #100. The code has not been updated since 2017 and the dev does not seem to respond. What about using another QR code scanner library? I am not a developer but skimming Github it looks like there are javascript based Qr code readers out there that are maintained and trusted like VueQrCode reader, which works on iOS 15.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants