Hello I'm trying to stream some youTube videos using the MPMoviePlayerController but I'm having some problems. The code i'm using is pretty simple and I can play .m4v videos by passing a URL to initWithContentURL. When I launch the movie player the player comes up but just goes away after about 20 seconds. When I try it in the simulator I get an alert view that says the server is not configured correctly. Is there an argument I need to pass with the URL to get a specific type of video feed from google?
NSURL *videoURL = [NSURL URLWithString:@"http://www.youtube.com/v/HGd9qAfpZio&hl=en_US&fs=1&"];
MPMoviePlayerController *moviePlayer;
moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:videoURL];
[moviePlayer play];
I've also tried the following URL's http://www.youtube.com/watch?v=HGd9qAfpZio
I have also seen the argument &format=1 and tried to add that to the end of both of the strings but no luck.
Thanks in advance for any help!