My app accesses the camera for purposes of webrtc, and works correctly.
I\'m using pwacompat from Google Labs to add pwa
features to my web app.
W
Update - 19/11/2020
WKWebView can use getUserMedia in iOS 14.3 beta 1.
Update - 14/09/2019
There are changes to Safari on iOS 13 & Safari 13: https://developer.apple.com/documentation/safari_release_notes/safari_13_release_notes
SFSafariViewController has gained getUserMedia functionality (!!!, however I need to confirm this, please see below for reports of it working)
However WKWebView does not seem to gain getUserMedia functionality:
iOS 13 and Safari 13 release notes:
Edit
In short: A PWA or any website being used on iOS outside of the native Safari app will not be allowed access to getUserMedia as Apple is deliberately blocking access for "Security concerns". This includes any websites saved to the homescreen and/or viewed inside another application such as Facebook. The same restrictions apply to Android however on Android the app developer can ask for Camera permissions and get around this. (This means if you are a website developer and you need camera functionality, you will need to ask Facebook, etc, to rebuild their app to allow this on Android).
See their bug tracker here: http://www.openradar.me/33571214 and https://forums.developer.apple.com/thread/88052
From web based Safari experiences to Native Android, etc. I make crossplatform Apps in web and native for a living. There are several potential problems you will encounter with getUserMedia. To workout what is causing potential problems you should follow this list in order to create a successful application.
Your problem is specifically 1. because you are not successfully querying the API. Nevertheless the MediaCapture from getUserMedia should fail because after fixing 1. you will encounter 2. and 3.
if (navigator && navigator.mediaDevices && navigator.mediaDevices.getUserMedia) { return true; } else return false;
returns false, and if getUserMedia throws and error ideally should be the same.'(location.protocol === 'https:') ? true : false;'
to see if you are allowed to get a successful MediaCapture requestThe following is a test link I use for platform support: https://github.com/marcusbelcher/wasm-asm-camera-webgl-test
In my GitHub there are also Android and React-native getUserMedia solutions