MPMoviePlayerController 不响应 setFullscreen = NO
我正在使用 MPMovieController 作为基础创建一个自定义 MovieController。 将视频切换到全屏,
_[moviePlayer setFullscreen:YES animated:YES];_
我可以通过调用相同的函数([moviePlayer setFullscreen:NOanimated:YES];) 以使电影播放器恢复到原始状态(即当用户按下完成按钮)不起作用。
作为替代方案,我还尝试 -
a) 监听 MPMoviePlayerDidExitFullscreenNotification 并调用 moviePlayBackDidFinish: 函数作为结果。
b) 使用此功能从“完成”功能内发布我的自定义通知 -
NSDictionary *thisDictionary = [NSDictionary dictionaryWithObject:[NSNumber numberWithInt:MPMovieFinishReasonUserExited] forKey:MPMoviePlayerPlaybackDidFinishReasonUserInfoKey];
[[NSNotificationCenter defaultCenter] postNotificationName:MPMoviePlayerDidExitFullscreenNotification object:moviePlayer userInfo:thisDictionary];
但在所有这些情况下,电影播放器视图不会返回到其原始状态。
请帮忙。
谢谢!
I'm creating a custom MovieController using MPMovieController as base. I can switch the video to full-screen by calling
_[moviePlayer setFullscreen:YES animated:YES];_
Calling the same function ([moviePlayer setFullscreen:NO animated:YES];) to bring the movie-player back to the original state (ie when user press Done button) does not work.
As an alternative, I've also tried to -
a) listening to MPMoviePlayerDidExitFullscreenNotification and calling moviePlayBackDidFinish: function as a result of this.
b) posting my custom notification from inside "Done" function using this -
NSDictionary *thisDictionary = [NSDictionary dictionaryWithObject:[NSNumber numberWithInt:MPMovieFinishReasonUserExited] forKey:MPMoviePlayerPlaybackDidFinishReasonUserInfoKey];
[[NSNotificationCenter defaultCenter] postNotificationName:MPMoviePlayerDidExitFullscreenNotification object:moviePlayer userInfo:thisDictionary];
But in all these cases, the movie-player view does not come back to its original state.
Help Please.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您必须注册该事件的通知。当您准备播放视频时,请执行以下操作
,并在您的电影PlayBackDidFinish选择器中执行以下操作
You have to register notification for the event. When you prepare for to play the video, do like this
and in your moviePlayBackDidFinish selector, do like this