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

  • SEARCH
  • Home
  • 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 6619331
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:57:12+00:00 2026-05-25T20:57:12+00:00

i have a portrait view with an embedded video. When changing orientation to landscape,

  • 0

i have a portrait view with an embedded video. When changing orientation to landscape, the MPMovieplayerController successfully switsches to fullscreen, but when changing back to portrait, it stays in fullscreen mode. The navigation bar flashes up for the rotation animation, but the video stays in (portrait-)fullscreen mode.

Do i miss something here?

- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];
    m_player = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL URLWithString:self.selectedVideo.videoHighURL ]]; 
m_player.scalingMode = MPMovieScalingModeAspectFit; 
m_player.controlStyle = MPMovieControlStyleFullscreen;
    m_player.view.frame = m_videoView.frame;
    [m_videoView addSubview:m_player.view];

[m_player play];
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
}



- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
    switch (toInterfaceOrientation) {
    case UIInterfaceOrientationPortraitUpsideDown:
        break;

    case UIInterfaceOrientationLandscapeLeft:
    case UIInterfaceOrientationLandscapeRight:
        if (NO == m_player.fullscreen) {
            [m_player setFullscreen:YES animated:YES];
        }
        break;
    case UIInterfaceOrientationPortrait:
            [m_player setFullscreen:NO animated:YES];

        break;

    default:
        break;
    }

}

Thanks in advance!

  • 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-25T20:57:12+00:00Added an answer on May 25, 2026 at 8:57 pm

    Solved the problem. I used MPMovieControlStyleFullscreen which seems to be incompatible with setFullscreen. With MPMovieControlStyleEmbedded it works fine… strange (Bug?).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My statusbar orientation is landscape, I have a cocos2d view that only supports portrait
I have two views within one .xib (one view for landscape, another for portrait).
My application goes back and forth between Portrait and Landscape. I have all of
I have a view with a button at the bottom of the portrait screen,
I have 2 button .In first button I used separate view for landscape and
I have a html page optimized for portrait view on different devices. Normally the
I have a UITextView embedded inside a grouped table view cell that I can't
In my app i have added tabBarController in split View's RootViewController.In that portrait mode
I have layouts for portrait mode (in folder layout) and for landscape one (in
I have 2 view controllers, root, and detail. The root view controller supports landscape

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.