I have an mp4 file called lebron.mp4 in my Resources folder:
-(IBAction)videoButtonClicked:(id)sender{
NSString *url = [[NSBundle mainBundle]
pathForResource:@"lebron"
ofType:@"mp4"];
MPMoviePlayerViewController* moviePlayerViewController = [[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL URLWithString:url]];
moviePlayerViewController.view.backgroundColor = [UIColor blackColor];
[self presentMoviePlayerViewControllerAnimated:moviePlayerViewController];
[moviePlayerViewController release];
}
Displays the movie player, but the movie doesn't play. Why?