Does Webkit in iOS 11 (Beta) Support Webrtc

Add webRTC in webview in iOS?

Unfortunately with the current WebRTC support in the iOS web browser, you can't easily add WebRTC. You would have to use the native iOS libraries (https://webrtc.org/native-code/ios/).

Enable WebRTC Support in WKWebView/UIWebView

ios Webview and WKWebView hasn't had WebRTC support until now.

From ios 14.3 ios is offering support for WKWebView:
https://leemartin.medium.com/ios-14-3-brings-webrtc-to-wkwebview-closing-gap-on-ios-accessibility-90a83fa6bda2

You need to update your iOS in your phone and/or Xcode 12.3.

Additionally, depending on your webview plugin ( in my case I am using cordova-plugin-inappbrowser) could be necessary to modify it to add permissions for video, camera, and VoIP.

IOS11 WebView for Add to home screen button

Based on the JavaScript test of this answer, Web Apps are getting displayed in a WKWebView in iOS 11.

You can also validate this with the following code snippet:

function browserTest() {  var whatBrowser = document.getElementById("whatBrowser");  var lte9 = /Constructor/i.test(window.HTMLElement);  var nav = window.navigator, ua = nav.userAgent, idb = !!window.indexedDB;  var browserText = "Other Browser"; 
if (ua.indexOf('Safari') !== -1 && ua.indexOf('Version') !== -1 && !nav.standalone) { browserText = "Safari"; } else if ((!idb && lte9) || !window.statusbar.visible) { browserText = "UIWebView"; } else if ((window.webkit && window.webkit.messageHandlers) || !lte9 || idb) { browserText = "WKWebView"; } whatBrowser.innerHTML = browserText;}
<html>  <head>    <meta name="apple-mobile-web-app-capable" content="yes">  </head>  <body onload="browserTest();">    <p id="whatBrowser"></p>  </body></html>


Related Topics



Leave a reply



Submit