View Source Vtt (HLS v0.1.0)

Encoding and decoding VTT files

Summary

Functions

Encodes a list of parts into a vtt file.

Parse a string.

Types

@type t() :: %Vtt{
  cues: [Vtt.Cue.t()],
  headers: [Vtt.Header.t()],
  use_cue_identifiers: boolean()
}

Functions

Link to this function

encode(vtt)

View Source (since 0.1.0)
@spec encode([t()]) :: String.t()

Encodes a list of parts into a vtt file.

Link to this function

parse(content)

View Source (since 0.1.0)
@spec parse(String.t()) :: Enumerable.t()

Parse a string.

This drops badly formatted vtt files.

This returns a stream so you decide how to handle it!