Class: shaka.media.ClosedCaptionParser

Constructor

new ClosedCaptionParser(mimeType)

Parameters:
Name Type Description
mimeType string
Implements:
Source:

Members

parserMap_ :Object.<string, shaka.extern.CeaParserPlugin>

Type:
Source:

ceaDecoder_ :shaka.extern.ICaptionDecoder

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

Methods

findParser(mimeType) → {shaka.extern.CeaParserPlugin}

Parameters:
Name Type Description
mimeType string
Source:
Returns:
Type
shaka.extern.CeaParserPlugin

registerDecoder(pluginnon-null)

Parameters:
Name Type Description
plugin shaka.extern.CaptionDecoderPlugin
Source:

registerParser(mimeType, pluginnon-null)

Parameters:
Name Type Description
mimeType string
plugin shaka.extern.CeaParserPlugin
Source:

unregisterDecoder()

Source:

unregisterParser(mimeType)

Parameters:
Name Type Description
mimeType string
Source:

init(initSegment)

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

parseFrom(mediaFragment) → {Array.<!shaka.extern.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.extern.ICaptionDecoder.ClosedCaption>

reset()

Resets the CaptionStream.
Implements:
Source: