Play video in objective C

 MPMoviePlayerController *moviePlayerController;

Write following method for play video

-(void)playVideo :(NSString *)strVideoUrl
{
    NSURL *videoURL = [NSURL URLWithString:[strVideoUrl stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
    NSLog(@"videoURL: %@", videoURL);
    moviePlayerController = [[MPMoviePlayerController alloc] initWithContentURL:videoURL];
    moviePlayerController.view.frame = CGRectMake(0, 0, [[UIScreen mainScreen] bounds].size.width, [[UIScreen mainScreen] bounds].size.height - 64);
    moviePlayerController.movieSourceType = MPMovieSourceTypeStreaming;
    [moviePlayerController.view setTranslatesAutoresizingMaskIntoConstraints:YES];
    [self.view addSubview:moviePlayerController.view];
    [moviePlayerController play];
}

Call play video method

 [self playVideo:_strUrl];