I'm trying to create a basic app on the iPad SDK 3.2, that displays one movie player that switches between different video sources. Switching between VOD using the code below does not have any issues. However if I switch to a live stream and then back to a VOD the video player constantly stalls.
I've also tried releasing then re-creating the player before switching video, but this has the same issue. Any help will be very much appreciated.
(void)moviePlayerWithUrl:(NSURL*)url {
if( self.moviePlayer ) {
[self.moviePlayer setContentURL:url];
}
else {
self.moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:url];
self.moviePlayer.shouldAutoplay = NO;
[self.view addSubview:self.moviePlayer.view];
self.moviePlayer.view.frame = CGRectMake(200, 100, 400, 300);
self.moviePlayer.view.backgroundColor = [UIColor grayColor];
self.moviePlayer.scalingMode = MPMovieScalingModeAspectFit;
}
}