MPMoviePlayer orientation

I am playing MP3 audio via url using MPMoviePlayer. But when it plays, it switches to Landscape layout, and I would like it to stay in portrait layout.

Any ideas?

Thanks, John

0


a source to share


2 answers


You can use an ugly hack and put it in a UIWebView, but this functionality should really be in MPMoviePlayer.



0


a source


Unfortunately, the movie player can only play movies in Scenery. You will need to recode movies rotated 480x320 instead of 320x480. After you play the movie, it changes the orientation of the status bar, so you need to flip it with setStatusBarOrientation:animated:

:



[[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationPortrait animated:NO];

      

0


a source







All Articles