views:

473

answers:

3

Hi,

I need to rotate the video player on iPhone (or let it autorotate).

I know the webview 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 ?

A: 

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 .

dwery
I don't need portrait mode, in need the good landscape orientation (left or right)
F.Santoni
it's not possible with the current version of the os
dwery
which method in MPMoviePlayerController can play a move at 90 degree rotated? thx
ohho
A: 

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.

systempuntoout
A: 

I'm answering my own question :

Since iOS 3.2 MPMoviePlayerViewController can just return YES to shouldAutorotate method.

F.Santoni