Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5959755
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:43:47+00:00 2026-05-22T18:43:47+00:00

Hey, I do have my App with Tabbar Navigation and everything else in portrait

  • 0

Hey,
I do have my App with Tabbar Navigation and everything else in portrait mode where no rotation is supported. Now I have to stream this video, that has to be landscape.
I’m using MPMoviePlayerController which works fine basically, but although it’s said to rotate automatically to landscape mode, it stays in portrait mode.

- (IBAction) openFourthInfo:(id)sender{
NSURL *url = [NSURL URLWithString:@"http://my-video.mp4"];
MPMoviePlayerController *player = [[MPMoviePlayerController alloc] initWithContentURL:url];  

[[NSNotificationCenter defaultCenter] addObserver:self  
                                         selector:@selector(moviePlaybackComplete:)  
                                             name:MPMoviePlayerPlaybackDidFinishNotification  
                                           object:player]; 

[[NSNotificationCenter defaultCenter] addObserver:self  
                                         selector:@selector(userPressedDone:)  
                                             name:MPMoviePlayerWillExitFullscreenNotification  
                                           object:player]; 

[self.view addSubview:player.view];  
[mainView setHidden:YES]; //Need to hide another subview here

player.fullscreen = YES;  
[player play];
}

This is how I call the Player. In userPressedDone: and moviePlaybackComplete: I basically just set mainView.setHidden = YES; , remove the observer, remove and release player.

Nothing extraordinary. Any idea why the player stays in portrait though?
I tried

[[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeRight animated:YES]; 

It animated a changing status bar, but the view stayed the same. By adding

[[player view] setBounds:CGRectMake(20, 0, 480, 320)];
[[player view] setCenter:CGPointMake(160, 240)];
[[player view] setTransform:CGAffineTransformMakeRotation(M_PI / 2)]; 

nothing happens. Replacing player view with self view, I just get the parent view to be rotated, not the player view.

Where’s the problem and how may I solve it? I’m trying since 5 hours or so -.-
Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T18:43:47+00:00Added an answer on May 22, 2026 at 6:43 pm

    MPMoviePlayerController no longer works in landscape by default so to make it work in landscape you need to apply a transform to the view.

    UIView * playerView = [moviePlayerController view];
    [playerView setFrame: CGRectMake(0, 0, 480, 320)];
    
    CGAffineTransform landscapeTransform;
    landscapeTransform = CGAffineTransformMakeRotation(90*M_PI/180.0f);
    landscapeTransform = CGAffineTransformTranslate(landscapeTransform, 80, 80);
    
    [playerView setTransform: landscapeTransform];
    

    In addition, if you want the regular full screen controls, use the following sample.

    moviePlayerController.fullscreen = TRUE;
    moviePlayerController.controlStyle = MPMovieControlStyleFullscreen;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey all - I have an app where I'm authenticating the user. They pass
Hey i have this div that shows as a popup: <div class=popup> </div> Then
Hey right now I'm using jQuery and I have some global variables to hold
Hey. I have an object that has a string property called BackgroundColor. This string
Hey guys I have a problem with an app I'm making. The thing is
Hey guys I have a ruby on rails app with a before filter setup
Hey all, I have a linq app using C# express2008 and sqlserver express 2005
Hey. So I have a Rails app that's getting deployed to a production machine
Hey guys, here's my requirement: I have one central App which receives requests from
Hey guys, and thanks for looking. I have built the simple D2D app from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.