iPhone video player - Change player orientation (w/ Playlist)
I need to rotate the video player on iPhone (or let it autorotate).
I know the w开发者_StackOverflowebview solution, but here come the problem, I need to play several video (distant), and WebView can't provide me a stopSelector.
I know the fact that setOrientation is a private API.
Is there a solution ?
Try with this:
[moviePlayer setOrientation:UIDeviceOrientationLandscapeRight animated:NO];
As you surely know, this solution will be rejected by Apple, as setOrientation for movie player is undocumented and part of the Private API.
I believe there's none.
I know there's people that pre-rotated a movie in order to make it appear as if it were in portrait mode, but it's a bit ugly.
update: it's supported on 3.2/4.0 using MPMoviePlayerController .
I'm answering my own question :
Since iOS 3.2 MPMoviePlayerViewController can just return YES to shouldAutorotate method.
精彩评论