MPMoviePlayerViewController *moviePlayerController;
NSURL *videoUrl=[NSURL URLWithString:@"String value of your url"];
Initialize the instance of MPmoviePlayerViewController with the url:
moviePlayerController = [[MPMoviePlayerViewController alloc] initWithContentURL:videoUrl];
**Present the controller as follows:**
[self presentMoviePlayerViewControllerAnimated:moviePlayerController];
[moviePlayerController.moviePlayer prepareToPlay];
moviePlayerController.moviePlayer.shouldAutoplay=YES;
[moviePlayerController.moviePlayer play];
0 Comment(s)