hi to all, I am creating a movie appliction in iphone/ipod .i have added a video to it . when i run it in simulator it runs properly in portrait mode.But when i run my app in ipod it opens a blank video and in landscape mode .but in simulator when i click on play my video directly plays in portrait mode and in ipod it opens a blank video in landscape mode which i want in portrait mode
This is my code for video:
-(IBAction)video1:(id)sender { NSBundle *bundle =[NSBundle mainBundle]; NSString *moviepath =[bundle pathForResource:@"CRY CRY - 90 Sec Video" ofType:@"mov"]; NSURL *movieURL =[[NSURL fileURLWithPath:moviepath]retain]; MPMoviePlayerController *theMovie =[[MPMoviePlayerController alloc]initWithContentURL:movieURL]; theMovie.scalingMode = MPMovieScalingModeAspectFill; [theMovie play]; MPMoviePlayerViewController *moviePlayer =[[MPMoviePlayerViewController alloc]initWithContentURL:movieURL]; [self presentMoviePlayerViewControllerAnimated:moviePlayer];
}
Please help me in solving this problem.