iOS WebView Guide


1.0 | Embedding the player in a WKWebView

A WKWebView object is a platform-native view that you use to incorporate web content into your app’s UI. To embed the player in a WKWebView in iOS, visit: https://developer.apple.com/reference/webkit/wkwebview

2.0 | Embedding the player in a UIWebView (deprecated)

To embed the player in a UIWebView in iOS, visit: https://developer.apple.com/reference/uikit/uiwebview

3.0 | Enable inline playback & autoplay

To enable inline playback on an iPhone, be sure to set

webView.allowsInlineMediaPlayback = YES;

To use autoplay use the following:

webView.mediaPlaybackRequiresUserAction = NO;

4.0 | Embed your video content

Place a Javascript embed code on a web page. The following script tag is an example embed code. Use the Online Video Platform to generate an embed code for your video content.

Make sure the selected playout has the setting “Force inView actions” enabled (read more about In- & Out View playout settings).

 

Load the web page in the webview.

NSURL *url = [[NSURL alloc] initWithString:@"http://yourcompany.com/demoWebPage"];
NSURLRequest *request = [[NSURLRequest alloc] initWithURL:url];
[self.webView loadRequest:request];

Was this article helpful?

Contact Support
Can't find the answer you're looking for?
Contact Support