title: iOS4 MPMoviePlayerController Embedding
body: <p>I am using MPMoviePlayerController currently to play a video inside IPhone and now I wish to play this video in a small area of the view (not the full screen). I think there is a frame way of doing it but I couldn't find the required tutorial somewhere. Have you been across any? That would be great.</p>
  
  <p>UPDATED</p>
  
  <hr>
  
  <p>I have reached to this point but still it doesn't show the player to play on screen.</p>
  
  <pre><code>-(IBAction)startVideo {
      //start video here
      NSURL *path = [[NSURL alloc] initWithString:[self localVideoPath:NO]];
  
      // Create custom movie player   
      MPMoviePlayerController *moviePlayer = [[[MPMoviePlayerController alloc] initWithContentURL:path] autorelease];
  
      [moviePlayer setScalingMode:MPMovieScalingModeAspectFill];
      [moviePlayer setControlStyle:MPMovieControlStyleNone];
      [moviePlayer setFullscreen:FALSE];
  
      // May help to reduce latency
      [moviePlayer prepareToPlay];
  
      [[NSNotificationCenter defaultCenter]
          addObserver:self
          selector:@selector(onMSAASDone:)
          name:MPMoviePlayerPlaybackDidFinishNotification
          object:moviePlayer];
  
  
      //---play partial screen---
      //moviePlayer.view.frame = CGRectMake(0, 0, 200, 300);
      moviePlayer.view.frame = image.frame;
      //[[moviePlayer view] setFrame: [image bounds]];
  
      [image removeFromSuperview];
  
      [self.view addSubview:moviePlayer.view];
  
      // Show the movie player as modal
      //[self presentModalViewController:moviePlayer animated:YES];
  
      // Prep and play the movie
      [moviePlayer play]; 
  }
  </code></pre>