-1

MPMoviePlayerController在 iPhone 设备中遇到问题。它在我的 iPhone 设备中播放,不清楚(无法正确查看视频内容)。但是它在我的模拟器中正常播放。

谁能告诉我解决这个问题的方法..

4

1 回答 1

0

使用此代码

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];
于 2011-05-27T13:31:05.673 回答