I am currently using MPMoviePlayerController to play videos inside the iPhone, and now I want to play this video in a small viewing area (and not full screen). I think there is a frame, but I could not find the right textbook. Have you been at all? It would be great.
UPDATED
I reached this point, but still it does not show the player for playback on the screen.
-(IBAction)startVideo {
NSURL *path = [[NSURL alloc] initWithString:[self localVideoPath:NO]];
MPMoviePlayerController *moviePlayer = [[[MPMoviePlayerController alloc] initWithContentURL:path] autorelease];
[moviePlayer setScalingMode:MPMovieScalingModeAspectFill];
[moviePlayer setControlStyle:MPMovieControlStyleNone];
[moviePlayer setFullscreen:FALSE];
[moviePlayer prepareToPlay];
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(onMSAASDone:)
name:MPMoviePlayerPlaybackDidFinishNotification
object:moviePlayer];
moviePlayer.view.frame = image.frame;
[image removeFromSuperview];
[self.view addSubview:moviePlayer.view];
[moviePlayer play];
}
source
share