In the past, navigator.mediaDevices.getUserMedia() was not available on WKWebView, but it has now been added as part of iOS 14.3, as these links show:
- https://developer.apple.com/forums/thread/88052?answerId=668022022#668022022 (original thread)
- https://caniuse.com/stream (see note 3)
- https://webkit.org/blog/11353/mediarecorder-api
However, I updated the deployment target of an application to iOS 14.3 and then attached the Safari debugger to the WKWebView, but navigator.mediaDevices still returns undefined when run on the JS console. In the third link above there are suggestions on steps to take in order to use getUserMedia.
navigator.mediaDevices.getUserMediacan now be exposed to WKWebView applications.navigator.mediaDevices.getUserMediais automatically exposed if the embedding application is able to natively capture either audio or video. Please refer to Apple documentation to meet these requirements.
I have followed the steps just in case but I still face the same problem.
Any ideas what I might be doing wrong? Has anyone else faced the same problem?