Iphone 在MPMoviePlayerController中检测下一个和上一个按钮事件
对于我的应用程序,我使用的是Iphone 在MPMoviePlayerController中检测下一个和上一个按钮事件,iphone,objective-c,mpmovieplayercontroller,Iphone,Objective C,Mpmovieplayercontroller,对于我的应用程序,我使用的是MPMoviePlayerController。问题是我应该如何检测下一个和上一个按钮事件。因为在MPMoviePlayerController中,我们可以检测各种事件,但我找不到任何方法来检测下一个和上一个按钮事件。我用来检测其他事件的代码是 - (void)moviePlayerPlaybackStateChanged:(NSNotification *)notification { MPMoviePlayerController *moviePlayer = n
MPMoviePlayerController
。问题是我应该如何检测下一个和上一个按钮事件。因为在MPMoviePlayerController
中,我们可以检测各种事件,但我找不到任何方法来检测下一个和上一个按钮事件。我用来检测其他事件的代码是
- (void)moviePlayerPlaybackStateChanged:(NSNotification *)notification {
MPMoviePlayerController *moviePlayer = notification.object;
MPMoviePlaybackState playbackState = moviePlayer.playbackState;
switch (playbackState) {
case MPMoviePlaybackStateStopped:
NSLog(@"stop");
break;
case MPMoviePlaybackStatePlaying:
NSLog(@"playing");
break;
case MPMoviePlaybackStatePaused:
NSLog(@"paused");
break;
case MPMoviePlaybackStateInterrupted:
NSLog(@"Interrupted");
break;
case MPMoviePlaybackStateSeekingForward:
NSLog(@"forward");
break;
case MPMoviePlaybackStateSeekingBackward:
NSLog(@"backword");
break;
default:
break;
}
}
我需要这个,因为我想在播放列表中播放上一首和下一首曲目。没有用于MPMoviePlayerPlayerPlayerBackstateDidChangeNotification的用户信息词典。u需要为下一个和上一个事件在外部添加按钮,但我在itunes上看到了一个应用程序,它执行完全相同的操作,没有在外部添加按钮。