I am trying to stream some video when the user presses a row in the tableView. I am using iOS 4.2 and when I press on a row I get sound but the tableview does not push away and you can’t see the video? I am sure that this is a huge newbie mistake but… I am a newbie!!! Thanks in advance!!!
-(void)tableView: (UITableView *)tableView didSelectRowAtIndexPath: (NSIndexPath *)indexPath {
NSString *video;
NSString *url;
NSUInteger row = [indexPath row];
video = [self.videoTitles objectAtIndex:row];
if () {
url = @"http://www.andalee.com/iPhoneVideos/mov.MOV";
MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc]
initWithContentURL:[NSURL URLWithString:url]];
[moviePlayer play];
} else if () {
url = @"http://www.andalee.com/iPhoneVideos/mov.MOV";
MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc]
initWithContentURL:[NSURL URLWithString:url]];
[[self view] addSubview:[moviePlayer view]];
[moviePlayer play];
}
;
[url release];
}
For iOS 3.2+, use
MPMoviePlayerViewController.