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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:40:48+00:00 2026-05-27T05:40:48+00:00

I have created my iPhone app in Xcode 4 with base SDK 4.3 In

  • 0

I have created my iPhone app in Xcode 4 with base SDK 4.3

In my iPhone app I have used MPMovieplayercontroller and using that I am playing Video

It is playing my video file in my iPod Touch with IOS 4.3 but if I install same project in my iPad with iOS 5, it is showing black screen only but not playing video.

what could be wrong?

Here is the code
in .h file

 MPMoviePlayerController *moviePlayer;

in .m file

 -(void)playVideo{
 NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"testbild1" ofType:@"m4v"]];
 moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:url];
UIView *testview = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 200, 200)];
[testview addSubview:moviePlayer.view];
 [self.view addSubview:testview];
  }  

   - (void)moviePlaybackComplete:(NSNotification *)notification  
   {  
    MPMoviePlayerController *moviePlayerController = [notification object];  
    [[NSNotificationCenter defaultCenter] removeObserver:self  
                                               name:MPMoviePlayerPlaybackDidFinishNotification  
                                               object:moviePlayerController];  

 [moviePlayerController.view removeFromSuperview];  


 }
  • 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-27T05:40:49+00:00Added an answer on May 27, 2026 at 5:40 am

    It doesn’t look like you’re setting autoplay

    shouldAutoplay
    A Boolean that indicates whether a movie should begin playback automatically.
    
    @property (nonatomic) BOOL shouldAutoplay
    

    So like:

    moviePlayer.shouldAutoplay = true;
    

    You should also be probably calling prepareToPlay and play from the MPMediaPlayback protocol that MPMoviePlayerController implements

    Old Post (should have been a comment):

    What version iOS? iOs 5.1 beta just came out and alters how MPMoviePlayerController works.

    You can get details on Apple’s iOS beta site but I can’t print them here YAY EULA.


    EDIT

    Now that the OS is public, here’s the relevant documentation (registration — you might have to pay the $100 as well, I forget…)

    • iOS 5.1 Release Notes (Search for prepareToPlay on that page — no deep linking)
    • MPMoviePlayerController class documentation
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've created an ad hoc distribution build for my iPhone app using Xcode 4.1.
I have created a static library in Iphone SDK in which I used some
I am new to using the SQLite database in iphone apps. I have created
I have recently created a Universal App in Xcode 4 to build my new
I am using the latest Xcode and i created a view based universal app
I have an iPhone application in the store that has in-app purchases. This app
I am currently creating an iPhone app using Xcode 4.0.2, I want the app
I've created an iPad game using the Universal App Xcode template. Since I'm in
I created an app, that when I deploy it in an iphone(3g), uploads fine
I have an application that was originally created compatible with iOS 2.x. With Xcode

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.