I have a MPMoviePlayerController that works fine until either the fast forward or rewind buttons are touched, it then stops the video and will not allow any other operations. The app is still on, does not crash, just the moviePlayer stops functioning. Any ideas?
here is some of the code:
here is some of the code:
Code:
NSString *path = [[NSBundle mainBundle] pathForResource:@"movie" ofType:@"mov"];
videoPlayer = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:path]];
[[videoPlayer view] setFrame:[scrollView bounds]];
[scrollView addSubview:[videoPlayer view]];
[videoPlayer setFullscreen:YES animated:YES];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(movieFinishedCallback:)
name:MPMoviePlayerPlaybackDidFinishNotification
object:videoPlayer];
[videoPlayer play];
}
-(void)movieFinishedCallback:(NSNotification*)notification{
[[NSNotificationCenter defaultCenter] removeObserver:self
name:MPMoviePlayerPlaybackDidFinishNotification
object:videoPlayer];
[videoPlayer.view removeFromSuperview];
[videoPlayer release];
}