开发者

MPMoviePlayerController switching from live to VOD stalling issue

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 = [U开发者_如何学JAVAIColor grayColor];
  self.moviePlayer.scalingMode = MPMovieScalingModeAspectFit;
 }
}


This is just an effect of using the simulator, once the code is running on an actual device this issue will not be seen.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜