Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

tiltem

macrumors newbie
Original poster
Oct 18, 2010
25
0
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:

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];
}
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.