Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
420 views
in Technique[技术] by (71.8m points)

safari - Does webKit in iOS 11 (Beta) support WebRTC?

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Update: WebRTC Support is coming in iOS14.3 (Beta) ??

Learn more here: https://webkit.org/blog/11353/mediarecorder-api/

From iOS11+ :

WebRTC is partially supported in WKWebView,
and fully supported in the Safari App browser.


Explained:

WebRTC has three main JavaScript APIs:

  • MediaStream (aka getUserMedia)
  • RTCPeerConnection
  • RTCDataChannel

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:

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...


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...