Hello,
I have an app that has multiple tabs and in one of those tabs I load a page which contains jPlayer (HML5 audio player) in order to play background music for the user. On another tab I have links to video files. When the music is playing on one tab and the person clicks on the video link it initially starts up in portrait mode and works just fine but any sort of tilting or rotating leads to a blank screen. The following is how I am playing the video. Also, if I remove the music tab then the video plays just fine. Please let me know if there is a fix for this, I would really appreciate it.
MPMoviePlayerViewController *theMovieView = [[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL URLWithString:self.string]];
[theMovieView moviePlayer].movieSourceType = MPMovieSourceTypeFile;
[theMovieView shouldAutorotateToInterfaceOrientation:YES];
theMovieView.moviePlayer.useApplicationAudioSession = NO;
[theMovieView moviePlayer].shouldAutoplay = TRUE;
[[theMovieView moviePlayer].view setBackgroundColor:[UIColor blackColor]];
[[theMovieView moviePlayer].backgroundView setBackgroundColor:[UIColor blackColor]];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(moviePlayBackDidFinish:) name:MPMoviePlayerPlaybackDidFinishNotification object:theMovieView];
//notifications
[[theMovieView moviePlayer].view addSubview:self.adView];
[[theMovieView moviePlayer].view bringSubviewToFront:self.adView];
//notifications
[self presentModalViewController:theMovieView animated:YES];