Class: shaka.media.ClosedCaptionParser

Constructor

new ClosedCaptionParser()

Implements:
Source:

Members

ceaDecoder_ :shaka.cea.ICaptionDecoder

Decoder for decoding CEA-X08 data from closed caption packets.
Type:
Source:

Methods

init(initSegment)

Initialize the caption parser. This should be called only once.
Parameters:
Name Type Description
initSegment BufferSource
Implements:
Source:

parseFrom(mediaFragment) → {Array.<!shaka.cea.ICaptionDecoder.ClosedCaption>}

Parses embedded CEA closed captions and interacts with the underlying CaptionStream, and calls the callback function when there are closed captions.
Parameters:
Name Type Description
mediaFragment BufferSource
Implements:
Source:
Returns:
An array of parsed closed captions.
Type
Array.<!shaka.cea.ICaptionDecoder.ClosedCaption>

reset()

Resets the CaptionStream.
Implements:
Source: