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 8730999
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:08:16+00:00 2026-06-13T09:08:16+00:00

I want to display a MPMoviePlayerViewController in full screen mode, but when the fullscreen

  • 0

I want to display a MPMoviePlayerViewController in full screen mode, but when the fullscreen button of the movieplayercontroller view is beeing pressed, first the MPMoviePlayerWillEnterFullscreenNotification gets called, as expacted, but than the MPMoviePlayerPlaybackDidFinishNotification is also beeing sent. As a reason it says MPMovieFinishReasonPlaybackEnded and i don’t know, what i’m doing wrong. (In addition, i use iOS 6.0 and XCode 4.5.1)

My expactations are, that only the MPMoviePlayerWillEnterFullscreenNotification is beeing called.

Short explanation to the code below:
The MovieplayerViewController’s view is beeing displayed in a tiny subview in my content view. When tapping the fullscreen-button, it first gets displayed as fullscreen but than also calls the exit button and stops playing (no crashes, nothing else).

MPMoviePlayerViewController *playerViewController = [[MPMoviePlayerViewController alloc] initWithContentURL:url];

   [playerViewController.moviePlayer setControlStyle:MPMovieControlStyleEmbedded];

   [playerViewController.moviePlayer setScalingMode:MPMovieScalingModeFill];

   CGRect rect = videoView.frame;

   rect.origin = CGPointZero;

   [playerViewController.view setFrame:rect];

   [playerViewController.moviePlayer prepareToPlay];


        //movie this is my contents subview, where i add the viewcontroller's view as a subbview
    [self.videoView addSubview:playerViewController.view];

    [self.videoView setHidden:NO];


    playerViewController.moviePlayer.useApplicationAudioSession = NO;

    [playerViewController.moviePlayer play];

    [[NSNotificationCenter defaultCenter] addObserver:self
                                             selector:@selector(moviePlayerDidFinishNotification:)
                                                 name:MPMoviePlayerPlaybackDidFinishNotification
                                               object:playerViewController.moviePlayer];
    [[NSNotificationCenter defaultCenter] addObserver:self
                                             selector:@selector(moviePlayerWillEnterFullscreenNotification:)
                                                 name:MPMoviePlayerWillEnterFullscreenNotification
                                               object:playerViewController.moviePlayer];    
    [[NSNotificationCenter defaultCenter] addObserver:self
                                             selector:@selector(moviePlayerWillExitFullscreenNotification:)
                                                 name:MPMoviePlayerWillExitFullscreenNotification
                                               object:playerViewController.moviePlayer];

        //i store the movieplayer in a property, so i can use it for further operations
    self.myPlayer = playerViewController;

    [playerViewController release];

And thats it!

When the resize (or fullscreen) button is being pressed, the moviePlayerDidFinishNotification: method also is being called

- (void)moviePlayerDidFinishNotification:(NSNotification*) aNotification {

    int reason = [[[aNotification userInfo] valueForKey:MPMoviePlayerPlaybackDidFinishReasonUserInfoKey] intValue];

    if (reason == MPMovieFinishReasonPlaybackEnded) {

        //movie finished playin

//in debug mode, it stops right at the NSLog

        NSLog(@"");
    }

    else if (reason == MPMovieFinishReasonUserExited) {

        //user hit the done button

    }

    else if (reason == MPMovieFinishReasonPlaybackError) {

        //error

    }

.. }

Is there something i do wrong or is there probably a change since iOS 6.0?

  • 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-06-13T09:08:16+00:00Added an answer on June 13, 2026 at 9:08 am

    Ok, seems to be that there are some problems in the MPMoviePlayerViewController. What helped is to simply us the MPMoviePlayerController only.

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

Sidebar

Related Questions

Is it able to put views to the left, but off-screen? I want display
I want to display character's names over their heads in my first person game(using
I want display images in gallery view it want to focus to paticular image
In a area of my UIView, i want display a UIImage, but the width
I want display error message in my view home.jsp using <c:out value=${message} /> .
I want to display data on table view cell from the database so I
In below code i want display tag of each button on console. I tried
I want to display tabular type data, but it will not be coming from
I want to display the current host and database names in a view. Where
Normally book module automatically generated book navigation but i want display only 2 book

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.