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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:17:04+00:00 2026-05-27T15:17:04+00:00

I am trying to implement video into my app and I am having a

  • 0

I am trying to implement video into my app and I am having a hard time. I have tried this tutorial and it was super helpful.

But now when I try to run my app and click on the button, the video frame comes up and just stays black. My video is in the correct format, I also made sure that I am pulling in the MediaPlayer Framework. Has anyone ran into this issue before or knows why this would be happening?

This is what I have:

-(IBAction)playMovie:(id)sender
{
    UIButton *playButton = (UIButton *) sender; 

    NSString *filepath   =   [[NSBundle mainBundle] pathForResource:@"big-buck-bunny-clip" ofType:@"m4v"];

    NSURL    *fileURL    =   [NSURL fileURLWithPath:filepath];
    MPMoviePlayerController *moviePlayerController = [[MPMoviePlayerController alloc] initWithContentURL:fileURL];

    [[NSNotificationCenter defaultCenter] addObserver:self
                                             selector:@selector(moviePlaybackComplete:)
                                                 name:MPMoviePlayerPlaybackDidFinishNotification
                                               object:moviePlayerController];

    [moviePlayerController.view setFrame:CGRectMake(38, 100, 250, 163)];

    [self.view addSubview:moviePlayerController.view];
    //moviePlayerController.fullscreen = YES;

    moviePlayerController.initialPlaybackTime = 5;

    [moviePlayerController play];

}
  • 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-27T15:17:05+00:00Added an answer on May 27, 2026 at 3:17 pm

    Have you added MPMoviePlayerController‘s view onto your view?

    MPMoviePlayerController *movieController = ...;
    movieController.view.frame = self.view.bounds;
    [self.view addSubview:movieController.view];
    

    Frame could also be black if you’ve set shouldAutoplay to YES and controlStyle to MPMovieControlStyleNone

    –Edit
    This is how I init my player and it works, maybe that will be of some help. It’s playing HTTP Live Streaming video, but it’ll play anything you put into it. You should try the url in this sample. If it’ll work then there’s definitely some problem with your contentUrl.

      url = [NSURL URLWithString:@"http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8"];
      self.moviePlayerController = [[MPMoviePlayerController alloc] initWithContentURL:url];
      moviePlayerController.view.frame = self.view.bounds;
      [self.view insertSubview:moviePlayerController.view atIndex:0];
      moviePlayerController.controlStyle = MPMovieControlStyleNone;
      moviePlayerController.shouldAutoplay = YES;
      [moviePlayerController prepareToPlay];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to implement a MPMoviePlayerView but I can't play the video files, I
I am trying to implement a Flash YouTube video player on this page .
I'm trying to implement a switch case statement like this: switch (active.attr('class')){ case video:
I am now trying to implement a app like picking image and video from
I'm trying to build/implement a Flash video player to play videos. I have looked
We have recently switched to Mercurial. After watching this helpful video: http://www.youtube.com/watch?v=-k2vLKOUb8s&noredirect=1 I am
Trying to implement a UITableView of names similar to the built-in Contacts iPhone app
I'm currently trying to implement a short video (10 seconds, looping) in a web
I'm trying to implement a screensaver on my application. Every time it's idle for
I'm trying to correctly implement the Open Graph tags for Facebook on a video

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.