Search code examples
iosiphonecameraqr-codeios11

iOS 11 Camera to scan qr code and pass it to a website


We are creating an HTML5 website for mobile and need to get camera access through the web browser in order to read QR Codes. Since we cannot create a native app, we managed to open the Camera from the webpage, get the photo and try to parse QR Code using a javascript library.

It works but it's far from beeing perfect.

Now iOS 11 native camera has QR Code scanning feature, but it seems like this feature is not available or not enabled on the native camera it opens from our web page.

Does anybody knows if it's possible to perform automatic QR Code scan on the native camera opened by a web page on iOS 11? Are there any metadata to set in order to get it work?

Thanks.


Solution

  • Since iOS11 comes with the new version of Safari and this one supports WebRTC and Media Capture API we are now able to get the camera stream into the web page.