IPhone : How to play .mp4 video in MPMoviePlayer controller

on Monday, March 30, 2015

Kindly tell me how to play a .mp4 format video play in MPMoviePlayerController


NSString *urlStr=[[NSBundle mainBundle]pathForResource:@"Tour.mp4" ofType:nil]; NSURL *url = [NSURL fileURLWithPath:urlStr]; MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:url]; [self.view addSubview:moviePlayer.view]; moviePlayer.view.frame = CGRectMake(0,154,720,428); [moviePlayer play];


0 comments:

Post a Comment