iOS WebView Guide


1.0 | Embedding the player in a WKWebView

Embedding the player in a WKWebView in iOS is very straightforward. (see: https://developer.apple.com/reference/webkit/wkwebview)

1.0 | Embedding the player in a UIWebView

Embedding the player in a UIWebView in iOS is reasonably straightforward. (see: https://developer.apple.com/reference/uikit/uiwebview )

To be able to play inline on an iPhone, be sure to set

webView.allowsInlineMediaPlayback = YES;

If you want to use autoplay, you can set

webView.mediaPlaybackRequiresUserAction = NO;

Place a javascript embed code on a web page. (This is an example embed code. You should get an actual one from the OVP. Make sure the playout used has the setting “Force inView actions” enabled.)


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];
Updated on August 25, 2020

Was this article helpful?

Related Articles