juacas / moodle-mod_treasurehunt

Activity module for Moodle that allows to run outdoor treasure-chases with geolocation and QR codes
GNU General Public License v3.0
6 stars 9 forks source link

On iPhone or iPad, only front camera #50

Open numerique-mood opened 3 years ago

numerique-mood commented 3 years ago

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 commented 3 years ago

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 https://github.com/juacas/moodle-mod_treasurehunt/blob/5ef48404896f99ffecef36fbb70d58ff0685e773/amd/src/webqr.js#L191 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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 2 years ago

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.