HLS.Playlist (HTTP Live Streaming (HLS) library v2.4.0)

View Source

HLS Playlist parses based on RFC 8216.

Summary

Functions

Given a master or media playlist and its child resource, like segment, builds the absolute URI that can be used to fetch it. The .m3u8 allows such resources to be absolute URIs on their own. This function respects it leaving the child resource as is.

Extracts the relative URI of a child resource, if possible.

Given a valid playlist file and a playlist module implementation, returns the deserialized list of tags.

Functions

build_absolute_uri(master_uri, media_uri)

@spec build_absolute_uri(master_or_media :: URI.t(), rendition_or_segment :: URI.t()) ::
  URI.t()

Given a master or media playlist and its child resource, like segment, builds the absolute URI that can be used to fetch it. The .m3u8 allows such resources to be absolute URIs on their own. This function respects it leaving the child resource as is.

extract_relative_uri(master_uri, media_uri)

@spec extract_relative_uri(
  master_or_media :: URI.t(),
  rendition_or_segment :: URI.t()
) :: URI.t()

Extracts the relative URI of a child resource, if possible.

marshal(playlist)

unmarshal(data, playlist)

Given a valid playlist file and a playlist module implementation, returns the deserialized list of tags.