我能够使用MPMoviePlayerViewController播放视频文件,一切工作正常。但是,如果我按Home按钮,现在打开应用程序,视频将从超级视图中删除。我知道如何获取通知。你能告诉我如何恢复相同的视频?在MPMoviePlayerViewController中恢复视频
NSString* filePath = [[NSBundle mainBundle] pathForResource:@"adv" ofType:@"mp4"];
NSURL* url = [NSURL fileURLWithPath:filePath];
_moviePlayer = [[MPMoviePlayerViewController alloc] initWithContentURL:url];
[_moviePlayer.view setFrame:self.view.bounds];
[self.view addSubview:_moviePlayer.view];
我正在使用上面的代码播放视频。如果我按下主页按钮,然后回到应用程序,视频就消失了。我能看到的只有中..为MPMoviePlayerPlaybackStateDidChangeNotification通知
请检查我更新的问题 – Perseus 2012-07-06 15:22:49