当我使用MPMoviePlayerController播放mp4时,它不起作用

时间:2012-10-18 14:50:30

标签: mpmovieplayercontroller mp4 xcode4.5

NSURL *fileURL=[NSURL fileURLWithPath:[NSString stringWithFormat:@"%@/start.m4v",  [[NSBundle mainBundle]  resourcePath]]];    
MPMoviePlayerController *moviePlayerController=[[MPMoviePlayerController alloc]initWithContentURL:fileURL];
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(moviePlaybackComplete:) name:MPMoviePlayerPlaybackDidFinishNotification object:moviePlayerController];
[moviePlayerController prepareToPlay];
[self.view addSubview:moviePlayerController.view];
moviePlayerController.fullscreen=YES;
[moviePlayerController play];
moviePlayerController.scalingMode=MPMovieScalingModeFill;

它不起作用。总是白色,什么都没有!出了什么问题?

0 个答案:

没有答案