2
votes

I'm using AVPlayer to play streamed content. AFAIK, there are 3 kinds of stream contents

  1. Progressive download: like VOD, this is a complete video. I can rewind & forward and get the duration of the video
  2. Live streaming: this is like watching a TV channel. I can't get the duration
  3. Live event: like a football match

Correct me if I'm wrong.

My question is Can AVPlayer work with live event? For example, the football match starts at 7:00AM and is about to last for 2 hours. You open the stream at 8:00AM, can you rewind back? Does the AVPlayer update the duration continuously ?

Also, I found the currentPlaybackTime

For video-on-demand or progressively downloaded content, this value is measured in seconds from the beginning of the current item. Changing the value of this property moves the playhead to the new location. For content streamed live from a server, this value represents the time from the beginning of the playlist when it was first loaded.

Not sure what For content streamed live from a server, this value represents the time from the beginning of the playlist when it was first loaded. mean

1

1 Answers

3
votes

I find this document to be useful Technical Note TN2288 Example Playlist Files for use with HTTP Live Streaming

Basic Video on Demand (VOD) Playlist

The index file is static and contains a complete list of URLs to all media files created since the beginning of the presentation. This kind of session allows the client full access to the entire program

Live Playlist (Sliding Window)

For live sessions, the index file is updated by removing media URIs from the file as new media files are created and made available.

Event Playlist

However, with the EVENT tag, you cannot change the playlist at all; you may only append new segments to the end of the file. They cannot be added at the front. New segments are added until the event has concluded, at which time the EXT-X-ENDLIST tag is appended

So technically, I think iOS AVPlayer can handle live event rewind, it only depends on how the server generates the playlist file