title: MPMoviePlayerController stops after four seconds
body: <p>I am trying to set up a very simple video player. (iOS 5.1, Xcode 4.3.1)</p>
  
  <pre><code>-(void)playMedia {
  NSString *movieFile = [[NSBundle mainBundle] pathForResource:@"Movie" ofType:@"m4v"];
  MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:movieFile]];
  
  [moviePlayer prepareToPlay];
  moviePlayer.view.frame = self.view.bounds;
  moviePlayer.scalingMode = MPMovieScalingModeAspectFit;
  moviePlayer.movieSourceType = MPMovieSourceTypeFile;
  moviePlayer.fullscreen = YES;
  moviePlayer.controlStyle = MPMovieControlStyleFullscreen;
  [self.view addSubview: moviePlayer.view];
  
  [[NSNotificationCenter defaultCenter] addObserver:self 
                                           selector:@selector(playMediaFinished:) 
                                               name:MPMoviePlayerPlaybackDidFinishNotification 
                                             object:moviePlayer];
  [moviePlayer play];
  }
  </code></pre>
  
  <p>It works fine when called, but it only plays for four seconds, then a black screen appears.  If I tap the screen during playback, it will play the entire sequence. If I stop tapping the screen for four seconds, the black screen appears.</p>
  
  <p>What am i missing?</p>
  
  <p>Kurt</p>
  
  <hr>
  
  <p>Edited version plays fine. </p>
  
  <p>In the interface file:</p>
  
  <pre><code>@property (nonatomic,strong) MPMoviePlayerController *myMovieController;
  </code></pre>
  
  <p>In the .m file:</p>
  
  <pre><code>-(void)playMedia {
  NSString *movieFile = [[NSBundle mainBundle] pathForResource:@"Movie" ofType:@"m4v"];
  MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:movieFile]];
  
  [moviePlayer prepareToPlay];
  moviePlayer.view.frame = self.view.bounds;
  moviePlayer.scalingMode = MPMovieScalingModeAspectFit;
  moviePlayer.movieSourceType = MPMovieSourceTypeFile;
  moviePlayer.fullscreen = YES;
  moviePlayer.controlStyle = MPMovieControlStyleFullscreen;
  
  self.myMovieController = moviePlayer;
  [self.view addSubview: self.myMovieController.view];
  
  [[NSNotificationCenter defaultCenter] addObserver:self 
                                           selector:@selector(playMediaFinished:) 
                                               name:MPMoviePlayerPlaybackDidFinishNotification 
                                             object:moviePlayer];
  [self.myMovieController play];
  }
  </code></pre>