title: MPMoviePlayerController not working properly
body: <p>I am making an application in which i am trying to play a video. The video starts properly but the video screen changes in black color after 4 sec. I dont know what is the problem.</p>
  
  <p>also when i am setting player.movieplayer.shouldautoplay = NO, there is no effect of this line, video starts automatically.</p>
  
  <p>Here is Code: </p>
  
  <pre><code>NSString *urlString = [[NSBundle mainBundle] pathForResource:@"Movie" ofType:@"m4v"];
  
  NSURL *urlObj = [NSURL fileURLWithPath:urlString];
  
  UIGraphicsBeginImageContext(CGSizeMake(1,1));
  MPMoviePlayerViewController *player = [[MPMoviePlayerViewController alloc] initWithContentURL:urlObj];
  UIGraphicsEndImageContext();
  
  [player.view setBounds:self.view.bounds];
  // when playing from server source type shoud be MPMovieSourceTypeStreaming
  [player.moviePlayer setMovieSourceType:MPMovieSourceTypeStreaming];
  [player.moviePlayer setScalingMode:MPMovieScalingModeAspectFill];
  
  player.moviePlayer.shouldAutoplay =  NO;
  
  [self.view addSubview:player.view];
  [player.moviePlayer play];
  </code></pre>
  
  <p>Am i missing something here??</p>
  
  <p>I tried to get the total duration of video (using duration property of mpmovieplayercontroller) but its showing 0.0. how to get the duration of video??</p>