Vttyl v0.5.1 Vttyl View Source
Encoding and decoding VTT files
Link to this section Summary
Functions
Encodes a list of parts into a vtt file.
Encodes a list of parts into a srt file.
Encodes a list of parts into a vtt file.
Parse a string.
Parse a stream of utf8 encoded characters.
Link to this section Functions
Link to this function
encode(parts)
View Source
(since 0.3.0)
encode(parts)
View Source
(since 0.3.0)
encode([Vttyl.Part.t()]) :: String.t()
encode([Vttyl.Part.t()]) :: String.t()
Encodes a list of parts into a vtt file.
This is currently deprecated use encode_vtt/1 or encode_srt/1 instead
Link to this function
encode_srt(parts)
View Source
(since 0.4.0)
encode_srt(parts)
View Source
(since 0.4.0)
encode_srt([Vttyl.Part.t()]) :: String.t()
encode_srt([Vttyl.Part.t()]) :: String.t()
Encodes a list of parts into a srt file.
Link to this function
encode_vtt(parts)
View Source
(since 0.4.0)
encode_vtt(parts)
View Source
(since 0.4.0)
encode_vtt([Vttyl.Part.t()]) :: String.t()
encode_vtt([Vttyl.Part.t()]) :: String.t()
Encodes a list of parts into a vtt file.
Link to this function
parse(content)
View Source
(since 0.1.0)
parse(content)
View Source
(since 0.1.0)
parse(String.t()) :: Enumerable.t()
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!
Link to this function
parse_stream(content)
View Source
(since 0.1.0)
parse_stream(content)
View Source
(since 0.1.0)
parse_stream(Enumerable.t()) :: Enumerable.t()
parse_stream(Enumerable.t()) :: Enumerable.t()
Parse a stream of utf8 encoded characters.
This returns a stream so you decide how to handle it!