title: How to Open Youtube video in MPMoviePlayerController and Play it
body: <p>i use this method before 1 time. but Now i can not get video from this URL that direct-play YouTube video in MPMoviePlayerController.</p>
  
  <p>URL = <a href="http://www.youtube.com/watch?v=JPUWNcGDyvM&amp;feature=player_embedded" rel="nofollow">http://www.youtube.com/watch?v=JPUWNcGDyvM&amp;feature=player_embedded</a></p>
  
  <pre><code>- (void)viewDidLoad
  {
  
     player = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://www.youtube.com/watch?v=JPUWNcGDyvM&amp;feature=player_embedded"]]];
  
  [[NSNotificationCenter defaultCenter]
   addObserver:self
   selector:@selector(movieFinishedCallback:)
   name:MPMoviePlayerPlaybackDidFinishNotification
   object:player];
  
  //---play movie---
  [player prepareToPlay];
  [player pause];
  
  player.view.frame = CGRectMake(0, 0, 320, 367);
  
  [self.view addSubview:player.view];   
  
  [super viewDidLoad];
  </code></pre>
  
  <p>}</p>
  
  <p>and My <code>movieFinishedCallback</code> is as Under ...</p>
  
  <pre><code>- (void) movieFinishedCallback:(NSNotification*) aNotification 
  { 
   player = [aNotification object];
  [[NSNotificationCenter defaultCenter]
   removeObserver:self
   name:MPMoviePlayerPlaybackDidFinishNotification
   object:player];
  }
  </code></pre>