title: Local video won't play in iOS 6 iPad app
body: <p>I haven't played a video file in iOS before, so I'm not sure if I'm just missing something. Th e player opens but it gets stuck with the loading animation and I can't hit the Done button. Could it be that my video file isn;t supported? I encoded it for ipad.</p>
  
  <pre><code>#import "ViewController.h"
  
  @interface ViewController ()
  
  @end
  
  @implementation ViewController
  
  - (void)viewDidLoad
  {
      [super viewDidLoad];
      // Do any additional setup after loading the view, typically from a nib.
  
      UIButton *video_btn = [UIButton buttonWithType:UIButtonTypeRoundedRect];
      video_btn.frame = CGRectMake(0, 0, 100, 50);
      [video_btn setTitle:@"Moonrise" forState:UIControlStateNormal];
      [video_btn addTarget:self action:@selector(playMovie:) forControlEvents:UIControlEventTouchUpInside];
      [self.view addSubview:video_btn];
  
  
  
  }
  
  -(IBAction)playMovie:(id)sender
  {
  
      NSString *filepath   =   [[NSBundle mainBundle] pathForResource:@"moonrise" ofType:@"mp4"];
      NSURL    *fileURL    =   [NSURL fileURLWithPath:filepath];
      MPMoviePlayerController *moviePlayerController = [[MPMoviePlayerController alloc] initWithContentURL:fileURL];
      [self.view addSubview:moviePlayerController.view];
      moviePlayerController.fullscreen = YES;
      [moviePlayerController play];
  
  }
  
  - (void)didReceiveMemoryWarning
  {
      [super didReceiveMemoryWarning];
      // Dispose of any resources that can be recreated.
  }
  
  @end
  </code></pre>
  
  <p>I get this as the output:</p>
  
  <pre><code>2012-09-25 12:47:56.206 App[4895:c07] [MPAVController] Autoplay: Disabling autoplay for pause
  2012-09-25 12:47:56.207 App[4895:c07] [MPAVController] Autoplay: Disabling autoplay
  2012-09-25 12:47:56.221 App[4895:c07] [MPAVController] Autoplay: Disabling autoplay for pause
  2012-09-25 12:47:56.222 App[4895:c07] [MPAVController] Autoplay: Disabling autoplay
  2012-09-25 12:47:56.226 App[4895:c07] [MPAVController] Autoplay: Skipping autoplay, disabled (for current item: 1, on player: 0)
  2012-09-25 12:47:56.255 App[4895:c07] [MPAVController] Autoplay: Enabling autoplay
  </code></pre>