我能夠使用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