A media playlist is the .m3u8 file that, for a single rendition, enumerates the media segments to play in order. Each segment is preceded by an #EXTINF tag giving its duration. The playlist also carries the target segment duration (#EXT-X-TARGETDURATION), the media sequence number of the first listed segment (#EXT-X-MEDIA-SEQUENCE), any encryption key (#EXT-X-KEY), discontinuity markers, and for live streams a list of partial segments and preload hints.

For VOD, the media playlist is static — list every segment once, end with #EXT-X-ENDLIST, cache for years. For live, it is a sliding window: the packager publishes new segments at the live edge, drops old ones from the start of the list, and the player re-fetches the playlist every segment-duration to discover them. The window size is typically 5–10 segments, equating to 30–60 s of seekable history.

A subtle but important detail: media playlist updates must be idempotent and consistent. If the player fetches the playlist twice within a second, the two responses must list the same segments and the same sequence numbers, or the player will get confused. This is hard to satisfy under CDN caching and is the reason most live media playlists ship with Cache-Control: max-age=1 or no-cache plus careful CDN config to let the freshness window match the segment-publish cadence.