I'm trying to transfer some youTube videos using MPMoviePlayerController but I am having some problems. The code I'm using is pretty simple, and I can play the .m4v video by passing the initWithContentURL URL. When I start the player, the player appears, but just leaves after about 20 seconds. When I try in the simulator, I get a warning saying that the server is configured incorrectly. Is there an argument I need to pass with a url in order to get a specific type of video stream 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 also tried using the following URL http://www.youtube.com/watch?v=HGd9qAfpZio
I also saw the argument & format = 1 and tried to add this to the end of both lines, but no luck.
ios youtube video mpmovieplayercontroller streaming
jmurphy Nov 22 '09 at 18:27 2009-11-22 18:27
source share