Hello all,
I've just attempted to load a YouTube with the MPMoviePlayerController and failed miserably. Here's the code I used...
Code:
-(IBAction)playVideo {
NSURL *movieURL = [NSURL URLWithString:@"http://www.youtube.com/watch?v=Jguhs6GxRvo"];
MPMoviePlayerController *theMovie = [[MPMoviePlayerController alloc] initWithContentURL:movieURL];
theMovie.scalingMode = MPMovieScalingModeAspectFit;
[theMovie play];
MPMoviePlayerViewController *moviePlayer = [[MPMoviePlayerViewController alloc] initWithContentURL:movieURL];
[self presentMoviePlayerViewControllerAnimated:moviePlayer];
}
The movie player loads but then quits as if it doesn't have anything to play.
Can anyone tell me whether what I'm trying to do is possible. If so, what am I doing wrong?
Cheers