i started out using MPMoviePlayerViewContoller and pushing it with
Code:
[self presentMoviePlayerViewControllerAnimated:movieController];
which exited immediately after playing the movie, which isn't what i want, i want the view to stick around so you can view the movie as many times as you want.
so i went with this:
Code:
- (void)replayVideo
{
playerView = [[MPMoviePlayerViewController alloc] initWithContentURL:self.movieFile];
MPMoviePlayerController *theMovie = [playerView moviePlayer];
theMovie.scalingMode = MPMovieScalingModeFill;
theMovie.shouldAutoplay = YES;
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(playBackDidFinish:) name:MPMoviePlayerDidExitFullscreenNotification object:nil];
//[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(playBackDidFinish:) name:MPMoviePlayerPlaybackDidFinishNotification object:nil];
[self.view.window addSubview:playerView.view];
}
what i've found though is that i'm correctly receiving the MPMoviePlayerPlaybackDidFinishNotification, (when it is uncommented), but i'm not receiving the MPMoviePlayerDidExitFullscreenNotification, either by hitting the Done button, or using the control to bring it out of full screen.
anyone know what's up here?