We should set the currentPlaybackTime after we get the MPMoviePlayerLoadStateDidChangeNotification notification.
To know whether the moviePLayer is loaded, first you need to register for MPMoviePlayerLoadStateDidChangeNotification
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(movieLoadStateDidChange:) name:MPMoviePlayerLoadStateDidChangeNotification object:nil];
Once the movie player is loaded movieLoadStateDidChange: will be called, then check for MPMovieLoadStatePlaythroughOK load state and set the currentPlaybackTime.
- (void)movieLoadStateDidChange:(NSNotification *)notification
{
MPMoviePlayerController *player = notification.object;
MPMovieLoadState loadState = player.loadState;
/* Enough data has been buffered for playback to continue uninterrupted. */
if (loadState & MPMovieLoadStatePlaythroughOK)
{
//should be called only once , so using self.videoLoaded - only for first time movie loaded , if required. This function wil be called multiple times after stalled
if(!self.videoLoaded)
{
self.moviePlayerController.currentPlaybackTime = self.currentPlaybackTime;
self.videoLoaded = YES;
}
}
}