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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T00:57:50+00:00 2026-05-16T00:57:50+00:00

Since 3.2 iPhone OS SDK, playing a video is really different. So I was

  • 0

Since 3.2 iPhone OS SDK, playing a video is really different.

So I was wondering if there is a way to make video play in full screen with a compatible code (both < and >3.2) without writing code for the two cases.

I think we’ll have to write 2 versions of our classes handling video playing…

Thy !

  • 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-16T00:57:51+00:00Added an answer on May 16, 2026 at 12:57 am

    I do basically what Jeff Kelly above suggests to run on 3.1 and above, note the instancesRespondToSelector call:

    // Initialize a movie player object with the specified URL
    MPMoviePlayerController *mp = [[MPMoviePlayerController alloc] initWithContentURL:movieURL];
    if (mp)
    {
    
        // Register to receive a notification when the movie has finished playing. 
        [[NSNotificationCenter defaultCenter] addObserver:self 
                                                 selector:@selector(moviePlayBackDidFinish:) 
                                                     name:MPMoviePlayerPlaybackDidFinishNotification 
                                                   object:nil];
    
    
        //Will only run this code for >= OS 3.2 
        if ([MPMoviePlayerController instancesRespondToSelector:@selector(setFullscreen:animated:)]){   
    
            [[NSNotificationCenter defaultCenter] addObserver:self 
                                                     selector:@selector(moviePlayBackStateDidChange:) 
                                                         name:MPMoviePlayerPlaybackStateDidChangeNotification 
                                                       object:nil];
            [[NSNotificationCenter defaultCenter] addObserver:self 
                                                     selector:@selector(nowPlayingMovieDidChange:) 
                                                         name:MPMoviePlayerNowPlayingMovieDidChangeNotification 
                                                       object:nil];
            [[NSNotificationCenter defaultCenter] addObserver:self 
                                                     selector:@selector(moviePlayBackDidFinish:) 
                                                         name:MPMoviePlayerDidExitFullscreenNotification 
                                                       object:nil];
    
            mp.controlStyle = MPMovieControlStyleFullscreen;
    
    
            [mp setScalingMode:MPMovieScalingModeAspectFit];
    
                        //change mainMenu here to whatever your parent view is
            [mp.view setFrame:mainMenu.frame];
            [self.view addSubview:mp.view];
    
    
    
            [mp setFullscreen:YES animated:NO];
        }
    //continue as normal
    

    and then later in the moviePlayBackDidFinish function I use the same technique to remove the notifications.

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

Sidebar

Related Questions

It is possible to easily use the GPS functionality in the iPhone since sdk
I just upgraded to iPhone SDK 3.2 Beta 4. Since doing so, I have
Can you please suggest me, best way to show pdf files in iphone since
Since CS3 doesn't have a web service component, as previous versions had, is there
Since the release of Adobe AIR I am wondering why Java Web Start has
Note - I have not delved very deeply into Apple's iPhone SDK yet. However,
I've slightly modified the iPhone SDK's GLSprite example while learning OpenGL ES and it
I recently downloaded the iPhone SDK 4 along with Xcode and neglected to install
Currently I am using iPhone SDK 3.1.2 for developing iPhone apps. Apple has recently
Ok I've been developing iphone-apps for over a year now, but there's this one

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.