//利用AVFouncation实现
NSURL *url=[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"1" ofType:@".mp4" ]];
//带有循环播放的player
//获取播放的对象
item=[AVPlayerItem playerItemWithURL:url];
//创建一个player
quePlayer =[[AVQueuePlayer alloc]init];
//循环播放item
playerLooper=[AVPlayerLooper playerLooperWithPlayer:quePlayer templateItem:item];
playerLayer =[AVPlayerLayer playerLayerWithPlayer:quePlayer];
playerLayer.frame=self.view.frame;
[self.view.layer insertSublayer:playerLayer atIndex:0];
[quePlayer play];
github例子