In my application, I play video using mpmovieplayercontroller
first set the zoom mode to MPmovieScalingmodefill and display the video correctly for scaling.
then after I watch the video in full screen mode and exit full screen mode, then do not set the zoom mode to MPmovieScalingmodeFill and display the video in defualt mode.
below my code to play video
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(ExitFullScreen:) name:MPMoviePlayerWillExitFullscreenNotification object:nil]; [appDelegate.moviePlayerController setContentURL:fileURL]; if ([appDelegate checkDevice]) { [appDelegate.moviePlayerController.view setFrame:CGRectMake(0,0, 320,463)]; } else { [appDelegate.moviePlayerController.view setFrame:CGRectMake(0,0, 320,375)]; } [appDelegate.moviePlayerController prepareToPlay]; appDelegate.moviePlayerController.scalingMode=MPMovieScalingModeFill; appDelegate.moviePlayerController.controlStyle=MPMovieControlStyleDefault; appDelegate.moviePlayerController.shouldAutoplay=NO; [appDelegate.moviePlayerController setFullscreen:YES animated:YES]; [appDelegate.moviePlayerController play]; [self.view addSubview:appDelegate.moviePlayerController.view]; - (void)ExitFullScreen:(NSNotification *)notification{ NSLog(@"Exit full Screen"); [appDelegate.moviePlayerController setControlStyle:MPMovieControlStyleEmbedded]; [appDelegate.moviePlayerController setScalingMode:MPMovieScalingModeFill];}
so my problem is how to set the zoom mode after exiting the full screen or not changing the zoom mode after the exit screen?
please help me.
thanks.
source share