title: How to play video in ios6
body: <p>I'm confused about:</p>
  
  <p>MPMoviePlayerViewController and MPMoviePlayerController</p>
  
  <p>what is the best way to play a video locally in ios6?</p>
  
  <p>this is my code</p>
  
  <pre><code>NSURL * url = [NSURL fileURLWithPath: [[NSBundle mainBundle] pathForResource: @ "17" OfType: @ "mov"]];
  
       MoviePlayer = [[MPMoviePlayerViewController alloc]
                       initWithContentURL: url];
       [self presentMoviePlayerViewControllerAnimated: MoviePlayer];
       [moviePlayer.moviePlayer play];
       [[NSNotificationCenter defaultCenter] addObserver: self selector: @ selector (moviePlayerPlaybackStateChanged :) name: MPMoviePlayerPlaybackStateDidChangeNotification object: nil];
  }
  
  
  -(void)moviePlayerPlaybackStateChanged:(NSNotification *)notification {
  
  
  }
  </code></pre>