视频嵌入在UIWebview上与iOS6模拟器或设备无关的链接上 [英] video embedded on a link not working on UIWebview with iOS6 simulator or device
本文介绍了视频嵌入在UIWebview上与iOS6模拟器或设备无关的链接上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
iOS 6 webview是否存在播放视频的问题? :(
does iOS 6 webview have an issue of presenting videos ? :(
我的代码是对webview的loadRequest方法的简单调用:
my code is a simple call to webview's loadRequest method:
self.webview.scalesPageToFit = YES;
[self.webview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.youtube.com/watch?v=3WEpUAQ7fa8"]]];
cosole说:
[MPAVController] Autoplay: Enabling autoplay
[MPAVController] Autoplay: Disabling autoplay for pause
[MPAVController] Autoplay: Disabling autoplay
[MPAVController] Autoplay: Ending background task assertion (8) for playback stall
[MPAVController] Autoplay: _streamLikelyToKeepUp: 0 -> 1
[MPAVController] Autoplay: Skipping autoplay, disabled (for current item: 1, on player: 1)
我提到这个答案但是徒劳无功。
请提出答案。
推荐答案
您好,因为您无法使用MPMoviePlayerController,您必须使用Webview,而不是使用
Hi since you cannot use MPMoviePlayerController, you have to use Webview, instead of using
self.webview.scalesPageToFit = YES;
[self.webview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.youtube.com/watch?v=3WEpUAQ7fa8"]]];
这篇关于视频嵌入在UIWebview上与iOS6模拟器或设备无关的链接上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文