使用MPMoviePlayerViewController进行视频播放时,真机可以,但是模拟器不可用,没有解决。。
- (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];
}

浙公网安备 33010602011771号