In my iOS app, I load videos from a URL and play them in my controller:
self.player = [[MPMoviePlayerController alloc] initWithContentURL:videoURL];
[self presentMoviePlayerViewControllerAnimated:self.player];
[self.player.view setFrame:CGRectMake(0, 0, 320, self.view.frame.size.height - 44)];
[self.player play];
[self.view addSubview:self.player.view];
This works fine for video shot in landscape, but videos that were shot in portrait are always rotated 90 degrees counterclockwise.
How do I check the orientation of the video and ensure it's played in the correct orientation?
You could get the width and height of the video itself with this property to know if its landscape or portrait.