Currently, when outputting video to an external display from an iPad, it moves the controls and everything to an external display. This is not useful because you cannot control the movie while the controls are on an external display. Here are some code snippets from our application.
This is the screen setup code: (method called setupExternalScreen)
if ([[UIScreen screens] count] > 1) {
external_disp = [[UIScreen screens] objectAtIndex:1];
[external_disp setCurrentMode:[[external_disp availableModes] objectAtIndex:0]];
self.external_window = [[UIWindow alloc] init];
external_window.screen = external_disp;
[external_window makeKeyAndVisible];
}
This is the creation of MPMoviePlayerViewController:
[self setupExternalScreen];
MPMoviePlayerViewController *mpv = [[MPMoviePlayerViewController alloc] initWithContentURL:url];
[self presentMoviePlayerViewControllerAnimated:mpv];
I also have MPMoviePlayerController, and I also tried this:
self.moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:url];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(playerDidFinish:) name:MPMoviePlayerDidExitFullscreenNotification object:[self moviePlayer]];
[self.view addSubview:moviePlayer.view];
if (!external_window) {
[self setupExternalScreen];
}
if (external_window) {
[external_window addSubview:moviePlayer.view];
}
[moviePlayer setControlStyle:MPMovieControlStyleDefault];
[moviePlayer setFullscreen:YES];
if (![moviePlayer isPreparedToPlay]) [moviePlayer prepareToPlay];
[moviePlayer play];
, self.view, _window, ( ), iPad , , , , . moviePlayer.view self.view, - " ", iPad. . TV Out, . Xcode 3.2.5 iOS . ? youtube iPad.