title: playing a youtube movie from url in objective C
body: <p>I have a tableview which contains youtube urls.</p>
  
  <pre><code>http://www.youtube.com/v/M67PNWvKdg0&amp;autoplay=1
  </code></pre>
  
  <p>I am trying to play the video file with the following piece of code. I also imported the media framework.</p>
  
  <pre><code>  Video *video = [self.fetchedResultsController objectAtIndexPath:indexPath];
          NSURL *urlString=[NSURL URLWithString:video.url];
          //NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle]
                                               //pathForResource:@"Video1" ofType:@"mp4"]];
  
          MPMoviePlayerViewController *playercontroller = [[MPMoviePlayerViewController alloc]
                                                           initWithContentURL:urlString];
  
          [self presentMoviePlayerViewControllerAnimated:playercontroller];
  
          playercontroller.moviePlayer.movieSourceType = MPMovieSourceTypeFile;
  
          [playercontroller.moviePlayer play];
  
  
          playercontroller = nil;
  </code></pre>
  
  <p>What it does for now is it pops up a movie player but then immediately goes back to my tableview. Does anybody knows what the problem is?</p>
  
  <p>Thanks in advance</p>