这是我的代码.
删除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中的视频?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)