title: iPhone App :How to play Youtube video in app using MPMoviePlayerController
body: <p>iPhone App :How to play Youtube video in app using MPMoviePlayerController</p>
  
  <p>for that  i write the code:</p>
  
  <pre><code> 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];
  </code></pre>
  
  <p>if i pass the url of local directory it is playing video</p>
  
  <pre><code> NSString* filePath = [[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent:@"Video.mp4"];
  NSURL* url = [[[NSURL alloc] initFileURLWithPath:filePath] autorelease];
  </code></pre>
  
  <p>How can I play video directly from youtube url to MPMoviePlayerController?</p>