-(void)playVideoWithUrl:(NSURL *)url{
AVPlayerViewController *playerViewController = [[AVPlayerViewController alloc]init];
playerViewController.player = [[AVPlayer alloc]initWithURL:url];
[self presentViewController:playerViewController animated:YES completion:nil];
playerViewController.view.frame = self.view.frame;
[playerViewController.player play];
}
网友评论