I\'m actually trying to play a local video into an UIWebView, with HTLM5.
What I do actually is this :
NSString *embedHTML = [NSString stringWithFo
just change base url as
NSString *videoPath =[[NSBundle mainBundle] pathForResource:@"xxx" ofType:@"mov"];
NSString *htmlString=[NSString stringWithFormat:@"<body> <video src=\"%@\" controls autoplay height=\"400\" width=\"300\" > </video> </body>", videoPath];
NSURL *baseURL = [NSURL fileURLWithPath:[[NSBundle mainBundle] bundlePath]];
[xwebview loadHTMLString:htmlString baseURL:baseURL];
Use this:
NSString *embedHTML = [NSString stringWithFormat:@"<html><style></style></head><body><video src=\"%@ controls autoplay height=\"400 width=\"320></video><ul></body></html>", [[NSBundle mainBundle] pathForResource:@"ash(1)" ofType:@"mov"]];
[webView setOpaque:NO];
//NSString *html = [NSString stringWithFormat:embedHTML, webView.frame.size.width, webView.frame.size.height];
NSURL *url = [NSURL URLWithString:[[NSBundle mainBundle] pathForResource:@"ash(1)" ofType:@"mov"]];
[webView loadHTMLString:embedHTML baseURL:url];
Refer more this to how to play video using html5