我试图在iOS 8中播放视频,我的代码在iOS 7中运行良好,而不是在ios 8中运行
NSURL *fileURL = [NSURL fileURLWithPath:path];
self.avPlayer = [AVPlayer playerWithURL:fileURL];
AVPlayerLayer *layer = [AVPlayerLayer playerLayerWithPlayer:self.avPlayer];
self.avPlayer.actionAtItemEnd = AVPlayerActionAtItemEndNone;
layer.frame = CGRectMake(0, 0, 1024, 768);
[self.view.layer addSublayer: layer];
[self.avPlayer play];