Skip to content

Implement seeking within HLS moving live window in ExoPlayer and its demo app #87

@perchrh

Description

@perchrh

The server may keep old chunks available to the streaming clients so that they can rewind the video, for example, to 10 minutes before the live position. Imagine you missed the start of a live tv-show or you were interrupted and missed a part, so you want to rewind it. There are two main, common cases here, the live playlist received by the clients can be of a short or a long duration.

  1. Often CDNs will give you a short playlist with 3-10 chunks, for a playlist duration of 2-3 minutes or less. In this case seeking inside the playlist is not very useful. Instead you would make a request to the CDN for a new playlist at a different position, for example live head - 20 minutes.
    The NASA TV public live stream is an example of this approach, http://www.nasa.gov/multimedia/nasatv/NTV-Public-IPS.m3u8

  2. The second case, that this issue covers, is where you get a long playlist, for example 120 chunks, or 1 hour, from the server. In this case seeking within the playlist is desirable. Because the server is continuously deleting old chunks (and writing new ones), you have a moving live window of a certain fixed size in seconds.
    The player/library must not request chunks outside of the window, as that will give an HTTP error (404). The seekbar must take the moving live window into consideration. While watching the stream, the seekbar should be in the same position, e.g. 10 minutes before live head. The playlist must be refetched when reaching the end of the playlist, or when the user seeks to the end of the playlist. The player UI could for example display "live" as the duration and "-10:00" for the current position when the user has rewinded the live video 10 minutes.

Please let me know if you would like a public sample stream for case (2).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions