MPMoviePlayerViewController playback stops on tapping stretch button in control

Discussion in 'iOS Programming' started by sujithkrishnan, Jun 4, 2010.

  1. sujithkrishnan macrumors 6502

    Joined:
    May 9, 2008
    Location:
    Bangalore
    #1
    Code:
    moviePlayerViewController = [[MPMoviePlayerViewController alloc] initWithContentURL:theURL];
    	moviePlayerViewController.moviePlayer.controlStyle = MPMovieControlStyleFullscreen;
    	[moviePlayerViewController.moviePlayer setFullscreen:YES];
    	//moviePlayerViewController.moviePlayer.scalingMode = MPMovieScalingModeAspectFit;
    	[self.controller presentMoviePlayerViewControllerAnimated:moviePlayerViewController];
    
    My code is as above. If i tap the stretch or forward button, the movieplayer will stops playing and dismiss the view controller. Also the PlyabackEndNotification method is getting called .
     
  2. sujithkrishnan thread starter macrumors 6502

    Joined:
    May 9, 2008
    Location:
    Bangalore
    #2
    I did inherited MPMoviePlayerViewController and added a overlay view with clear color over the forward and expand button, in short disabled the user interaction over both controls.

    Place the overlay view like below

    Code:
    - (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
    {
    	if(UIInterfaceOrientationIsPortrait(toInterfaceOrientation))
    		overlayView.frame = CGRectMake(420.0, 850.0, 170.0, 100.0);
    	else
    		overlayView.frame = CGRectMake(550.0, 590.0, 170.0, 100.0);
    
    }
    
     
  3. mscarafo macrumors newbie

    Joined:
    Aug 13, 2010
    #3
    presentMoviePlayerViewControllerAnimated video stops

    I'm experiencing the same problem. Has any else figured out why the video stops playing when tapping these buttons?
     

Share This Page