here is a sample code, you can try it alone, after rotation you need to set the palyer multimedia view in the center of self.view, here is a sample code ... you need to add MediaPlayer Framework first ....
NSString* moviePath = [[NSBundle mainBundle] pathForResource:@"PATRON_LOGO_3" ofType:@"mp4"]; NSURL* movieURL = [NSURL fileURLWithPath:moviePath]; MPMoviePlayerController *playerCtrl = [[MPMoviePlayerController alloc]initWithContentURL:movieURL]; playerCtrl.scalingMode = MPMovieScalingModeFill; playerCtrl.controlStyle = MPMovieControlStyleNone; [playerCtrl.view setCenter:CGPointMake(240, 160)]; [playerCtrl.view setTransform:CGAffineTransformMakeRotation(M_PI/2)]; playerCtrl.view.frame = CGRectMake(0, 0, 320, 480); [self.view addSubview:playerCtrl.view]; [playerCtrl play];
I think it works fine, this is for landscape mode for portraiture, we need to set the frame to fit the portrait, for example ..
playerCtrl.view.frame = CGRectMake (0, 0, 480, 320);
after that we have to set the center of the review.
jillu_
source share