MPMoviePlayerController寻找前进按钮停止IOS7中的视频?

MPMoviePlayerController寻找前进按钮停止IOS7中的视频?,第1张

概述我在iOS 7中面临MPMoviePlayerController的问题.当我单击前向搜索按钮时,视频停止并且不允许执行任何类似于再次播放全屏和滑块更改的 *** 作. 这是我的代码. 删除MPMoviePlayerPlaybackDidFinishNotification的Observer [[NSNotificationCenter defaultCenter] removeObserver:movi 我在iOS 7中面临MPMovIEPlayerController的问题.当我单击前向搜索按钮时,视频停止并且不允许执行任何类似于再次播放全屏和滑块更改的 *** 作.

这是我的代码.
删除MPMovIEPlayerPlaybackDIDFinishNotification的Observer

[[NSNotificationCenter defaultCenter] removeObserver:movIEPlayerVIEwController  name:MPMovIEPlayerPlaybackDIDFinishNotification object:movIEPlayerVIEwController.movIEPlayer];

并添加新通知MPMovIEPlayerPlaybackDIDFinishNotification

[[NSNotificationCenter defaultCenter]addobserver:self selector:@selector(vIDeoFinished:) name:MPMovIEPlayerPlaybackDIDFinishNotification object:nil];

这是我处理MPMovIEPlayerPlaybackDIDFinishNotification的自定义方法

-(voID)vIDeoFinished:(NSNotification*)aNotification{    MPMovIEPlayerController *movIEPlayer = [aNotification object];    NSLog(@"%f",movIEPlayer.currentPlaybackTime);    int reason = [[[aNotification userInfo] valueForKey:MPMovIEPlayerPlaybackDIDFinishReasonUserInfoKey] intValue];    if (reason == MPMovIEFinishReasonPlaybackEnded) {    }else if (reason == MPMovIEFinishReasonUserExited) {         [self performSelector:@selector(dismiss:) withObject:aNotification afterDelay:0.5];    }else if (reason == MPMovIEFinishReasonPlaybackerror) {    }}

我需要在单击时停止这种奇怪的行为并继续播放.

有人知道怎么做吗?
谢谢.

解决方法

I think there are no any notifications or event are available on user interaction with the standard player buttons,and i have to implement own UI for the player controls. by this way we can then determine the actions for a single touch,long touch,etc. Then,we can add whatever functionality like increasing the play rate,or simply seeking to a time.

总结

以上是内存溢出为你收集整理的MPMoviePlayerController寻找前进按钮停止IOS7中的视频?全部内容,希望文章能够帮你解决MPMoviePlayerController寻找前进按钮停止IOS7中的视频?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1099781.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-28
下一篇 2022-05-28

发表评论

登录后才能评论

评论列表(0条)

保存