In my app i have multiple Videos and i want that when the user press the next or previous button in the MPMoviePlayerController, the MPMoviePlayerController should the parti
Apple introduced new class Called AVQueuePlayer using this you can play many videos at a time this class is worth using then MPMoviePlayerController which not support playing multiple movies.
AVQueuePlayer is avalible from IOS 4.1 and above it is subclass AVPlayer. If u familiar with AVPlayer
You can change current running movie with call
[self.queuePlayer advanceToNextItem];
You can look at the sample code here
You can download the sample application from here
Another Idea (worst case).
Register for the notification with
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(moviePlayerPlaybackStateChanged:) name:MPMoviePlayerPlaybackStateDidChangeNotification object:nil];
And add this function to your object:
-(void)moviePlayerPlaybackStateChanged:(NSNotification *)notification {
MPMoviePlayerController *moviePlayer = notification.object;
MPMoviePlaybackState playbackState = moviePlayer.playbackState;
// ...
}
I suspect you'll find that you're getting MPMoviePlaybackStateSeekingForward and ...SeekingBackward updates for those buttons.
See the details here
And set the corresponding URL's for the MPMoviePlayerController or initialize again the MPMoviePlayerController with the corresponding URL's.