Register for the MPMoviePlayerPlaybackStateDidChangeNotification
like this
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(MPMoviePlayerPlaybackStateDidChange:)
name:MPMoviePlayerPlaybackStateDidChangeNotification
object:nil];
Within the notification handler method, check for the actual state - e.g. like this:
- (void)MPMoviePlayerPlaybackStateDidChange:(NSNotification *)notification
{
if (player.playbackState == MPMoviePlaybackStateStopped)
{
//stopped playing
} else if (player.playbackState == MPMoviePlaybackStatePlaying) {
//is playing
} else {
}
}
to remove the observer use this code
[[NSNotificationCenter defaultCenter] removeObserver:self
name:MPMoviePlayerPlaybackDidFinishNotification
object:nil];
refer MPMoviePlayerController_Class playback property doc for more info.