An interface for plugins that parse text tracks.
Methods
-
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 dataArrayBuffer The data that makes up the init segment. -
parseMedia(datanon-null, timeContext) → (non-null) {Array.<!shakaExtern.Cue>}
-
Parse a media segment and return the cues that make up the segment.
Parameters:
Name Type Description dataArrayBuffer The next section of buffer. timeContextshakaExtern.TextParser.TimeContext The time information that should be used to adjust the times values for each cue. - Implementations:
- Source:
Returns:
- Type
- Array.<!shakaExtern.Cue>
Type Definitions
-
TimeContext
-
A collection of time offsets used to adjust text cue times.
Type:
- {periodStart: number, segmentStart: number, segmentEnd: number}
Properties:
Name Type Description periodStartnumber The absolute start time of the period in seconds. segmentStartnumber The absolute start time of the segment in seconds. segmentEndnumber The absolute end time of the segment in seconds. - Source: