如何在osx自动播放中制作avplayer?
我试过这个:
NSURL *videoURL = [[NSBundle mainBundle]
URLForResource:@"video name" withExtension:@"mp4"];
self.movieView.player = [AVPlayer playerWithURL:videoURL];
它没有自动播放?
答案 0 :(得分:8)
您尚未调用播放方法。
[self.movieView.player play]
答案 1 :(得分:3)
我认为,AVplayer首先检查URL内容是否可用。你必须在上面添加观察者。
$('.openTarget').on('click',function (e) {
$(this).parent().parent().dblclick();
});