Class: shaka.text.SrtTextParser

Constructor

new SrtTextParser()

Implements:
Source:

Members

Methods

convertSrtCue_(caption) → {string}

Convert a SRT cue into WebVTT cue
Parameters:
Name Type Description
caption string
Source:
Returns:
Type
string

srt2webvtt(data) → {string}

Convert a SRT format to WebVTT
Parameters:
Name Type Description
data string
Source:
Returns:
Type
string

parseInit(datanon-null)

Parse an initialization segment. Some formats do not have init segments so this won't always be called.
Parameters:
Name Type Description
data Uint8Array The data that makes up the init segment.
Implements:
Source:

parseMedia(datanon-null, timeContext) → {Array.<!shaka.extern.Cue>}

Parse a media segment and return the cues that make up the segment.
Parameters:
Name Type Description
data Uint8Array The next section of buffer.
timeContext shaka.extern.TextParser.TimeContext The time information that should be used to adjust the times values for each cue.
Implements:
Source:
Returns:
Type
Array.<!shaka.extern.Cue>