[Solved] Play local video file in UIwebview [closed]


Try this :

NSString* htmlString = [NSString stringWithFormat:@"!DOCTYPE html>
<html lang="en">
<head>
<title>test</title>
<body>
<div>
<embed src="https://stackoverflow.com/questions/24551251/yourVideoName.mov" Pluginspage="http://www.apple.com/quicktime/" width="90%"   height="166px" CONTROLLER="true" LOOP="false" AUTOPLAY="false" name="IBM Video"></embed>
</div>
</body></html>"];

UIWebView *webview = [[UIWebView alloc] initWithFrame:CGRectMake(frame+(i*20), 0, 300,   height)];
webview.allowsInlineMediaPlayback = YES;
webview.delegate = self;
[webview loadHTMLString:htmlString baseURL:[[NSBundle mainBundle] bundleURL]];
[previewScrollView addSubview:webview];

3

solved Play local video file in UIwebview [closed]