0

我正在寻找在 tvOS 上播放远程 mp4 视频AVPlayer。(我已经成功播放视频,但有一个困惑)我查看了不同的论坛,并且有一种方法可以与 AVURLAsset 一起使用,方法是

 func loadValuesAsynchronouslyForKeys(_ keys: [String],
                   completionHandler handler: (() -> Void)?)

我见过人们使用playable, duration and tracks钥匙。我不知道这些键有什么作用。我的问题是,我可以在哪里检查此功能的不同键的文档。

我也不明白这条线在苹果文档中的含义

A “key” is any property in a class that implements this protocol. 

https://developer.apple.com/library/prerelease/mac/documentation/AVFoundation/Reference/AVAsynchronousKeyValueLoading_Protocol/index.html#//apple_ref/occ/intfm/AVAsynchronousKeyValueLoading/loadValuesAsynchronouslyForKeys:completionHandler:

4

1 回答 1

1

AVAsynchronousKeyValueLoading是由许多类实现的协议,包括AVURLAsset您正在使用的类。因此,您可以查看文档AVURLAsset(及其父类AVAsset),您可以在其中找到playabletracksduration其他键的功能。

于 2015-12-18T14:47:21.407 回答