问题
MPMoviePlayerController video goes to full screen mode at the time screen is black color. And then the app was blocked. This issue only for iOS 6.0. But iOS 5.1 working fine. This is my code. IF I double click the player full screen is opened, But show black screen.
self.moviePlayerController = [[MPMoviePlayerController alloc] init];
[self.moviePlayerController.view setFrame:_moviePlayerContentView.bounds];
[self.moviePlayerController setControlStyle:MPMovieControlStyleNone];
[self.moviePlayerController setAllowsAirPlay:NO];
[_moviePlayerContentView addSubview:self.moviePlayerController.view];
[self.moviePlayerController stop];
[self.moviePlayerController setContentURL:videoURL];
[self.moviePlayerController.view setHidden:NO];
[self.moviePlayerController prepareToPlay];
[self.moviePlayerController play];
How can I handle this issue?
After reach MPMovieFinishReasonPlaybackEnded, then How to disable the full screen mode?
Please help me. Thanks in advance.
回答1:
In iOS 6,MPMoviePlayerController full screen calls ViewDidDisappear method. You may have stop player in ViewDidDisappear method. If so, remove it for while and try once again.
来源:https://stackoverflow.com/questions/14437511/ios-6-0-mpmovieplayercontroller-full-screen-mode-black-color-then-app-blocked-n