View Source HLS.Playlist (HTTP Live Streaming (HLS) library v2.0.0)

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

Link to this function

build_absolute_uri(master_uri, media_uri)

View Source
@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.

Link to this function

extract_relative_uri(master_uri, media_uri)

View Source
@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.

Link to this function

unmarshal(data, playlist)

View Source

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