title: iPhone SDK 4: video autorotation from MPMoviePlayerViewController
body: <p>Could you please show an example of <code>shouldAutorotateToInterfaceOrientation</code> method usage as a part of MPMoviePlayerViewController? As far as I know, using <code>shouldAutorotateToInterfaceOrientation</code> method is available not only for UIView but also for MPMoviePlayerViewController since SDK 3.2. I've been using it in UIView, in 3.1, but I don't understand how to use it in MPMoviePlayerViewController class.</p>
  
  <p>This is what I have for now:</p>
  
  <pre><code>-(IBAction) playMovie {
  
  //declaring path to file and stuff...
  
      MPMoviePlayerViewController *playerViewController = [[MPMoviePlayerViewController alloc] initWithContentURL:url];
  
          [[NSNotificationCenter defaultCenter] addObserver:self
                                                   selector:@selector(moviePlayBackDidFinish:)
                                                       name:MPMoviePlayerPlaybackDidFinishNotification
                                                     object:[playerViewController moviePlayer]];
  
          [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(moviePlayBackDidFinish:) name:MPMoviePlayerPlaybackDidFinishNotification object:[playerViewController moviePlayer]];      
  
          MPMoviePlayerController *player = [playerViewController moviePlayer];
          [self.view addSubview:playerViewController.view];
          player.controlStyle = MPMovieControlStyleDefault;
          player.shouldAutoplay = YES;
          [player setFullscreen:YES animated:YES];
      } 
  
      - (void)moviePlayBackDidFinish:(NSNotification*)notification {
          MPMoviePlayerViewController *moviePlayer = [notification object];
          [[NSNotificationCenter defaultCenter] removeObserver:self
                                                          name:MPMoviePlayerPlaybackDidFinishNotification
                                                        object:moviePlayer];
  
          [moviePlayer.view removeFromSuperview];
  
          [moviePlayer release];  
      }
  </code></pre>
  
  <p>It works just fine but I need to know how to implement video autorotation. The method used for it in UIView does not help.</p>
  
  <p>Thanks.</p>