When displaying media content using HTML5 in a web view on IOS the autoplay functionality does not work.
To enable to web view to autoplay the media (if coded in HTML to autoplay) you need to add a line of code in your IOS application as explained.
Let's say you have a webview object declared as in line below.
UIWebView *videoView;
Then you need to add the code after initializing the webview as below.
videoView.mediaPlaybackRequiresUserAction = NO;
videoView.allowsInlineMediaPlayback = YES
This forces the video/audio to autoplay in UIWebView if directed in HTML code.
0 Comment(s)