- (IBAction) startVideo: (id) sender
{
NSURL * video = [[NSURL alloc] initWithString: @ "http://www.w3schools.com/html/movie.mp4"];
MPMoviePlayerViewController * controller = [[MPMoviePlayerViewController alloc] initWithContentURL: video];
controller.view.frame = CGRectMake (20, 50, 280, 180);
controller.moviePlayer.view.center = self.view.center;
[self.view addSubview: controller.view];
[controller.moviePlayer prepareToPlay];
[controller.moviePlayer play];
} jayesh mardiya
source share