iOS 6.0 MPMoviePlayerController full screen mode b

2019-07-14 12:32发布

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条回答
乱世女痞
2楼-- · 2019-07-14 13:34

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.

查看更多
登录 后发表回答