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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:59:07+00:00 2026-05-26T07:59:07+00:00

This code works perfectly on iPad 4.3 Simulator: NSString *source = [mediaObject objectForKey:@source]; NSString

  • 0

This code works perfectly on iPad 4.3 Simulator:

NSString *source = [mediaObject objectForKey:@"source"];
NSString *videoPath = [NSString stringWithFormat:@"%@/%@", path, source];
NSURL *videoUrl = [NSURL fileURLWithPath:videoPath];

MPMoviePlayerController *videoPlayer = [[MPMoviePlayerController alloc] initWithContentURL:videoUrl];
videoPlayer.shouldAutoplay = NO;

videoPlayer.view.frame = CGRectMake(xPos, yPos, width, height);

[backgroundImageView addSubview:videoPlayer.view];

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(videoPlaybackStateDidChange:) name:MPMoviePlayerPlaybackStateDidChangeNotification object:videoPlayer];

but it doesn’t work on iPad 5 Simulator. I get a black frame with no movie nor playback controls.

I read the Apple changelog about MPMoviePlayerController, but I didn’t found anything about this problem. Can you help me?

  • 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-26T07:59:08+00:00Added an answer on May 26, 2026 at 7:59 am

    I solved the problem in this way: in my header file I wrote:

    MPMoviePlayerController *moviePlayer;
    

    with this property:

    @property(nonatomic, strong) MPMoviePlayerController *moviePlayer;
    

    and in the method in which I init the moviePlayer:

    MPMoviePlayerController *player = [[MPMoviePlayerController alloc] initWithContentURL:movieUrl];
    self.moviePlayer = player;
    

    It seems that assigning the player to a property “saves” the player. But don’t ask me why…

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

Sidebar

Related Questions

This code works perfectly in Ubuntu, Windows, and Mac OS X. It also works
I am using ASP.NET to transmit a .jar file. This code works perfectly on
This is kind of a brainteaser question, since the code works perfectly fine as-is,
The first half of this code works perfectly. However the second. Where an items
This code works perfectly myNotebook = new wxNotebook( this, IDC_NOTEBOOK, wxDefaultPosition, wxSize(500, 500) );
This code have been working until I updated last night. The code works perfectly
This code works perfectly except that it doesn't print the last 2 rows of
What reason this code works perfectly: <script type=text/javascript> $(document).ready(function() { $(#login_form).submit(function() { $.post(ajax_login.php, {
I'm doing something with XML and now I'm confused. This code works perfectly: QDomElement
var a,b,c; var arr = [1,2,3]; [a,b,c] = arr; this code works perfectly in

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.