Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
HLS (m3u8) 文件引用 mpeg-ts 文件。在 iOS 的 AVPlayer 播放过程中,如何确定当前播放的 mpeg-ts URI?
如果您正在寻找对当前下载 TS 的 URI 的引用,则它不可用。您可以通过查看当前AVPlayerItem的 -accessLog.
AVPlayerItem
-accessLog
例如: [[[player currentItem] accessLog] events]
[[[player currentItem] accessLog] events]
这是一个NSArray' AVPlayerItemAccessLogEvents。
NSArray
AVPlayerItemAccessLogEvent
但它不会为您提供 TS 本身的 URI。您可能只需要根据播放头当前所在的位置相对于持续时间以及片段大小来计算当前 TS。