iOS4 MPMoviePlayerController Incorporação
Atualmente, estou usando o MPMoviePlayerController para reproduzir um vídeo dentro do IPhone e agora desejo reproduzi-lo em uma pequena área da exibição (não na tela inteira). Eu acho que existe uma maneira de fazer isso, mas não consegui encontrar o tutorial necessário em algum lugar. Você já se deparou com algum? Isso seria bom
ATUALIZAD
Cheguei a esse ponto, mas ele ainda não mostra o player para jogar na tel
-(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];
}