1.导入视频到项目中
2.导入数据库
#import <AVKit/AVKit.h>//.m写入<AVKit/AVKit.h>可以写入控件按钮什么的
#import <AVFoundation/AVFoundation.h>///系统播放库
3.//获取本地资源 NSString *file=[[NSBundle mainBundle]pathForResource:@"1.mp4" ofType:nil]; //创建本地播放器 AVPlayerViewController *av=[[AVPlayerViewController alloc]init]; //播放器获取本地资源进行播放 av.player=[AVPlayer playerWithURL:[NSURL fileURLWithPath:file]]; //跳转model [self presentViewController:av animated:YES completion:nil]; //自动播放 [av.player play];