餘米下載AAC文件,併發揮它的MPMoviePlayerController下面的代碼的MPMoviePlayerController顯示黑屏在iOS 5中僅
movieController = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:self.filePath]];
[self.view addSubview:movieController.view];
CGRect screenBound = [[UIScreen mainScreen] bounds];
CGSize screenSize = screenBound.size;
movieController.view.frame = CGRectMake(0,0,screenSize.width, screenSize.height);
[movieController setFullscreen:YES];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(doneBtnMediaPlayer:) name:MPMoviePlayerWillExitFullscreenNotification object:nil];
movieController是(非原子,強)類屬性
能正常工作在所有除iOS 5(和iOS 5模擬器)以外的iOS。 在iOS 5中,它顯示黑屏和文件在後臺播放。
我注意到的另一件事是,當我運行的應用程序已經存在的應用程序,然後其工作正常iOS5也。但是,當我從設備上刪除應用程序,然後運行它,當時它只是顯示黑屏。
2013年12月..提示 - 它是關於文件擴展名(文件形式網絡)非常flakey。在我的應用程序中,.MOV有效,.mov很難將iPhone崩潰。離奇。此外,模擬器根本無法工作,它完全沒用,只是崩潰。最後在MPMoviePlayerViewController方法的作品中,MPMoviePlayerController是無用的和破碎的。 – Fattie