I have a URL that is working fine with Safari on iOS11 (Beta) Audio/Video is working fine. But when I load this URL with WKWebView it gives me an error "Incompatible Browser" and when I check my browser version in WebKit it shows "WebKit based browser on iOS 11"
So the question really is, has Apple included this change in the WKWebview webkit (which should be the same as Safari) for the developer BETA of iOS 11?
Since iOS11,
WebRTC is partially supported in WKWebView,
and fully supported in the Safari App browser.
Explained:
WebRTC has three main JavaScript APIs:
For apps running inside Safari App, iOS11+, all WebRTC APIs are supported. That includes getUserMedia
. Be sure to use adapter.js library for best compatibility, since each browser - including Safari - uses a different name for its implementation. For example, in Safari it's navigator.mediaDevices.getUserMedia()
.
But, when using WKWebView or SFSafariViewController, it's a different story:
RTCPeerConnection
and RTCDataChannel
are supported and working.getUserMedia
is not supported yet, for "security reasons". It most probably won't be available before the next major OS release, which would be iOS 12 in September 2018. You can still stream video & audio from local storage or consume live media captured by a peer. Hopefully in iOS 12 we'll see some progress...