Class: shaka.media.VttTextParser

A TextEngine plugin that parses WebVTT files.

Parameters:
Name Type Attributes Description
data ArrayBuffer
segmentStartTime number <nullable>
segmentEndTime number <nullable>
Source:
Throws:
Returns:
Type
Array.<!TextTrackCue>

Methods

(private, static) parseCue_(textnon-null) → (nullable) {TextTrackCue}

Parses a text block into a Cue object.
Parameters:
Name Type Description
text Array.<string>
Source:
Returns:
Type
TextTrackCue

(static) parseSetting(cuenon-null, word) → {boolean}

Parses a WebVTT setting from the given word.
Parameters:
Name Type Description
cue VTTCue
word string
Source:
Returns:
True on success.
Type
boolean

(private, static) parseTime_(parsernon-null) → (nullable) {number}

Parses a WebVTT time from the given parser.
Parameters:
Name Type Description
parser shaka.util.TextParser
Source:
Returns:
Type
number