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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T09:39:26+00:00 2026-05-31T09:39:26+00:00

i’m pretty new to xcode and i’m using xcode4, constructing an app with the

  • 0

i’m pretty new to xcode and i’m using xcode4, constructing an app with the storyboards.
Now, this is my code to display a simple video taken from inside my project:

-(IBAction)playMoviePoliReel:(id)sender
{
NSString *filepath = [[NSBundle mainBundle] pathForResource:@”SAMPLE” ofType:@”MOV”];
NSURL *fileURL = [NSURL fileURLWithPath:filepath];

moviePlayerController = [[MPMoviePlayerController alloc] initWithContentURL:fileURL];

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

moviePlayerController.shouldAutoplay = YES;
[self.view addSubview:moviePlayerController.view];
[moviePlayerController.view setFrame:CGRectMake(31, 130, 477, 360)]; 
moviePlayerController.fullscreen = YES; 
[moviePlayerController play];
setStatusBarOrientation:UIInterfaceOrientationLandscapeRight animated:YES];
}
(void)moviePlaybackComplete:(NSNotification *)notification  
{  
MPMoviePlayerController *moviePlayerController = [notification object];  
[[NSNotificationCenter defaultCenter] removeObserver:self  
                                                name:MPMoviePlayerPlaybackDidFinishNotification  
                                              object:moviePlayerController];  
[moviePlayerController.view removeFromSuperview];  
}  

I have the video called SAMPLE.MOV in my project, in the directory resources, and created a button that onTouchDown make the function PlayVideoPoliReel go ahead… but, for a reason i cannot explain, in the player i see no video and no audio. The function seems to load the file cause in the player i see the time lasting to the end of the video and it’s correct. The video only plays totally black…

I controlled if the video is seen by the program with an if NSFileManager defaultManager]fileExistsAtPath:filepath] and the file exist…

Additionally if i use

NSURL *fileURL = [NSURL URLWithString:@"http://www.ebookfrenzy.com/ios_book/movie/movie.mov"];

using a video taken from the web, the player function perfectly. The video is loaded and i can see audio and video… I’m getting mad on this! Please 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-31T09:39:28+00:00Added an answer on May 31, 2026 at 9:39 am

    If the movie is drm’d it will play all black as you described, is the sample movie drm’d? Movies and TV from the iTunes store can’t be played from your application.

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

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I am using Paperclip to handle profile photo uploads in my app. They upload
I'm making a simple page using Google Maps API 3. My first. One marker
link Im having trouble converting the html entites into html characters, (&# 8217;) i

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.