【发布时间】:2014-08-24 10:23:08
【问题描述】:
我无法在 UIWebview 中播放本地视频文件。这是我的代码有什么问题吗?或者 Apple 不允许在 UIWebview 中播放本地视频文件。
NSString *webViewString = [NSString stringWithFormat:@"<!doctypehtml><html><head><title>SimpleMoviePlayer</title></head><body><videosrc=\"%@\">controls autoplay height=\"270\">
width=\"1000\"></video></body></html>",pathOftheLocalFile];
UIWebView *webview = [[UIWebView alloc] initWithFrame:CGRectMake(frame+(i*20), 0, 300, height)];
webview.allowsInlineMediaPlayback = YES;
webview.delegate = self;
[webview loadHTMLString:webViewString baseURL:nil];
[previewScrollView addSubview:webview];
【问题讨论】:
-
感谢您的回复。但我想在 UIWebview 中播放本地视频。我已经提到了所有对我不起作用的链接。
-
我认为问得对。@andrew Barber。
-
不知道为什么这个问题被关闭了。它没有任何问题。
标签: ios objective-c uiwebview