Ios8 AVPlayer未在iOS 8中播放视频

Ios8 AVPlayer未在iOS 8中播放视频,ios8,avplayer,Ios8,Avplayer,我尝试在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 = AV

我尝试在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];

你听到声音了吗?没有,它只是显示一个黑屏,没有声音在我的情况下,我听到一些声音,但没有视频:/