I'm trying to stream a video in my app. The method I've found is :
NSURL *theMovieURL = [NSURL URLWithString:self.data.trailer];
if (theMovieURL)
{
self.movieController = [[MPMoviePlayerViewController alloc] initWithContentURL:theMovieURL];
[self presentMoviePlayerViewControllerAnimated:self.movieController];
[self.movieController.moviePlayer play];
}
I'm not sure if it's the most conventional, but it works.
The problem is that I can't figure out how to allow the landscape mode, for the video only. Should I use something like shouldAutorotate
or shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
, and how ?
FYI, the entire app allows only the portrait mode.
Thanks for your help.