I want to scan a QR code from my website and i'm using the html5-qrcode
js library.
It is working properly from safari
or whatever browser I use it in.
It asks for permissions, then makes you select the camera you want to use
and finally shows you the preview of the camera
If I add my website to the homescreen this behavious changes...
I can click the button to allow permissions to use the camera
but after a few seconds it looks like the permit I just granted gets denied and the camera just won't start.
This seems to only affect IOS devices since it's working on an Android device I used to test this feature.
You can test this behaviour on this website scanApp
Currently my IOS version is 17.5.1 (latest at current date)
I tried adding the meta tag:
<meta name="apple-mobile-web-app-capable" content="yes">
But nothing really changed...
Looking forward to a solution :/
Looks like this issue can be fixed by soft resetting your device
To do so follow these steps:
1 - Tap volume up button
2 - Tap volume down button
3 - Long press power button until apple logo shows
This solved the issue for me