I have two View controllers, in the firstViewController i wrote the code for MPMoviePlayerController and in the secondViewController also i wrote the same Code . then, only one MPMoviePlayerController is showing Video, But the other one is showing Black Screen.Even i Created one instance of MPMoviePlayerController for the both ViewController but Still did not work for me.
Here is the sample Code:
myPlayer = [[MPMoviePlayerController alloc] init];
[myPlayer.view setFrame:CGRectMake(0, 0, 320, 393)];
myPlayer.shouldAutoplay = NO;
myPlayer.repeatMode = MPMovieRepeatModeNone;
myPlayer.fullscreen = YES;
myPlayer.movieSourceType = MPMovieSourceTypeStreaming;
myPlayer.scalingMode = MPMovieScalingModeAspectFit;
myPlayer.contentURL =theurl;
[self.view addSubview:myPlayer.view];
Please tell me, How to Play Video in both View Controllers?
Thank in Advance