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

我在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.

相关文章

UITabBarController 是 iOS 中用于管理和显示选项卡界面的一...
UITableView的重用机制避免了频繁创建和销毁单元格的开销,使...
Objective-C中,类的实例变量(instance variables)和属性(...
从内存管理的角度来看,block可以作为方法的传入参数是因为b...
WKWebView 是 iOS 开发中用于显示网页内容的组件,它是在 iO...
OC中常用的多线程编程技术: 1. NSThread NSThread是Objecti...