iPhone App: Como reproduzir vídeo do Youtube no aplicativo usando o MPMoviePlayerController

iPhone App: Como reproduzir vídeo do Youtube no aplicativo usando o MPMoviePlayerController

para que escrevo o código:

 NSString *urlAddress = @"http://www.youtube.com/xyz";
 NSLog(@"URL ADDress : %@",urlAddress);

 //Create a URL object.
  NSURL *url = [NSURL URLWithString:urlAddress];

movie = [[MPMoviePlayerController alloc] initWithContentURL:url];
movie.scalingMode=MPMovieScalingModeAspectFill;
    movie.view.frame = CGRectMake(0.0, 0.0, 320.0, 460.0);
[self.view addSubview:movie.view];
[movie play];

se eu passar o URL do diretório local, ele está reproduzindo vídeo

 NSString* filePath = [[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent:@"Video.mp4"];
NSURL* url = [[[NSURL alloc] initFileURLWithPath:filePath] autorelease];

Como reproduzir vídeo diretamente do URL do YouTube para MPMoviePlayerController?

questionAnswers(2)

yourAnswerToTheQuestion