- (IBAction)movie:(id)sender {
NSString *path = [[NSBundle mainBundle]pathForResource:@"movie" ofType:@"MOV"];
NSURL *URL = [[NSURL alloc]initFileURLWithPath:path];
_moviePlayer = [[MPMoviePlayerViewController alloc]initWithContentURL:URL];
[self presentMoviePlayerViewControllerAnimated:_moviePlayer];
[_moviePlayer.moviePlayer play];
}
转载于:https://www.cnblogs.com/dyn-blog/p/5507828.html
原文链接:https://blog.csdn.net/weixin_30342827/article/details/97783541
本站声明:网站内容来源于网络,如有侵权,请联系我们,我们将及时处理。
本博客所有文章如无特别注明均为原创。
复制或转载请以超链接形式注明转自起风了,原文地址《使用MPMoviePlayerViewController进行视频播放时,真机可以,但是模拟器不可用,没有解决。。…》
复制或转载请以超链接形式注明转自起风了,原文地址《使用MPMoviePlayerViewController进行视频播放时,真机可以,但是模拟器不可用,没有解决。。…》
还没有人抢沙发呢~