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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T20:53:59+00:00 2026-05-16T20:53:59+00:00

The code below is more or less taken from the example MPMoviePlayerController sample code.

  • 0

The code below is more or less taken from the example MPMoviePlayerController sample code. In an app I wrote last year, it used to play videos fullscreen without an issue. Since iOS 4.0, there’s just audio in the background. It’s like the movie player doesn’t have a view or the view is behind my app. I can still interact with my app, even ‘start’ a new video (audio only).

It’s like the movie player now needs a view, but I don’t see any way of supplying this in the API or the sample code (which does seem to be a version or two behind.

I load my videos from a URL and if I type these into Safari, they play just fine.

Here’s the relevant code fragments, for what it’s worth:

- (void)playMovieUrl:(NSURL*)url
            delegate:(id)delegate
    callbackSelector:(SEL)selector
{
    @try {
        movieFinishedCallbackDelegate = delegate;
        movieFinishedCallbackSelector = selector;
        movieURL = url;
        MPMoviePlayerController* theMovie=[[MPMoviePlayerController alloc] initWithContentURL:url]; 

        [[NSNotificationCenter defaultCenter] addObserver:self 
                                                 selector:@selector(myMovieFinishedCallback:) 
                                                     name:MPMoviePlayerPlaybackDidFinishNotification 
                                                   object:theMovie]; 
        [theMovie play];
    }
    @catch (NSException * e) {
        return;
    }
} 

// When the movie is done,release the controller. 
-(void)myMovieFinishedCallback:(NSNotification*)aNotification 
{
    MPMoviePlayerController* theMovie=[aNotification object]; 
    [[NSNotificationCenter defaultCenter] removeObserver:self 
                                                    name:MPMoviePlayerPlaybackDidFinishNotification 
                                                  object:theMovie];
    [theMovie release];
    [movieURL release];
    [movieFinishedCallbackDelegate performSelector:movieFinishedCallbackSelector];
}
  • 1 1 Answer
  • 1 View
  • 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-16T20:53:59+00:00Added an answer on May 16, 2026 at 8:53 pm

    You probably need to present theMovie:

    [self presentMoviePlayerViewControllerAnimated:theMovie];
    

    And change to:

    MPMoviePlayerViewController

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

Sidebar

Related Questions

I have code that looks more or less like the code below but it
Code below is used to save PostgreSql database backup from browser in Apache Mono
in the code below at first if statements block (there will be more than
In the following code below, I'm trying to translate, or more a graphics context
The code I have below works fine but I'm sure it could be more
I'm running the PHP code below from command line. The issue is, its memory
I have followed the sample code below to upload a zip file in the
My code below is causing my app to quit i.e. get black screen and
Last week I wrote a few lines of code in C# to fire up
Would the code bellow cause my code to leak? More specifically, am I responsible

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.