An HLS (m3u8) file references mpeg-ts files. During its playback in iOS' AVPlayer, how can i determine the currently playing mpeg-ts URI?
If your looking for a reference to the URI of the currently downloading TS, it's not available. You can get the URI of the stream for the current bit-rate by looking at the current AVPlayerItem
's -accessLog
.
E.g.:
[[[player currentItem] accessLog] events]
It's an NSArray
of AVPlayerItemAccessLogEvent
's.
But it's not going to give you the URI of the TS per se. You may just have to calculate the current TS by where the playhead is currently at in relation to the duration as well as the segment size.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With