My iPhone app has a tab Bar Controller with 4 tabs, 3 of those tabs contains a Navigation controller and the 4th is just a view controller. I want my app to be locked in portrait mode, so I changed the info.plist file and the "shouldAutorotateToInterfaceOrientation:" method.
In one of the navigation controllers, if the user selects a button, a video is played in fullscreen portrait using MPMoviePlayerController. How can I get my video to play in landscape while keeping the rest of my app locked in portrait? Here is the code to load the video if it is needed. Thanks for any help.
Code:
- (void)loadVideo {
NSString *url = [[NSBundle mainBundle] pathForResource:@"Video1" ofType:@"mp4"];
player = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:url]];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(movieFinishedCallback:) name:MPMoviePlayerPlaybackDidFinishNotification object:player];
[self.view addSubview:player.view];
[player setFullscreen:YES animated:YES];
[player play];
}