iOS 6.0 MPMoviePlayerController full screen mode black color? then App blocked no more actions

孤街浪徒 提交于 2020-01-15 03:26:08

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!