Thanks,
NSURL* videoURL = [NSURL URLWithString:url];
MPMoviePlayerController moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:videoURL];
[moviePlayer prepareToPlay];
[moviePlayer play];
//For viewing partially.....
[moviePlayer.view setFrame:CGRectMake(50, 200, (self.view.frame.size.width)-100, 400)];
moviePlayer .view.backgroundColor = [UIColor grayColor];
[self.view addSubview:moviePlayer.view];
I developed a running MPMoviePlayer(pre 3.2 SDK) iPhone application, there is no problem. I know this is a newbie question, but how to play movies in the new MPMoviePlayerViewController. I only listen to music and hope to learn the new view controller. I ported my entire application On the iPad, everything else works fine except for videos. Can someone show an example with the movie view controller? Any help would be greatly appreciated.
Thank you,
NSURL* videoURL = [NSURL URLWithString:url];
MPMoviePlayerController moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:videoURL];
[moviePlayer prepareToPlay];
[moviePlayer play];
//For viewing partially.....< br />[moviePlayer.view setFrame:CGRectMake(50, 200, (self.view.frame.size.width)-100, 400)];
moviePlayer.view.backgroundColor = [UIColor grayColor];
[self.view addSubview:moviePlayer.view];