问题描述
|
我的iPhone设备中的“ 0”有问题。它无法在我的iPhone设备上播放(无法正确查看视频内容)。但是,它在我的模拟器中正常播放。
谁能告诉我一种解决此问题的方法。
解决方法
使用此代码
NSString *filepath = [[NSBundle mainBundle] pathForResource:@\"aaa\" ofType:@\"mp4\"];
NSURL *fileURL = [NSURL fileURLWithPath:filepath];
MPMoviePlayerController *moviePlayerController = [[MPMoviePlayerController alloc] initWithContentURL:fileURL];
[moviePlayerController.view setFrame:CGRectMake(0,70,320,270)];
[self.view addSubview:moviePlayerController.view];
moviePlayerController.fullscreen = YES;
[moviePlayerController play];