Class: shaka.media.MuxJSClosedCaptionParser

Constructor

new MuxJSClosedCaptionParser()

Implements:
Source:

Members

(private) muxCaptionParser_ :muxjs.mp4.CaptionParser

Type:
  • muxjs.mp4.CaptionParser
Source:

(private, non-null) timescales_ :Object.<number, number>

Timescales from the init segments, used for mux.js CaptionParser.
Type:
  • Object.<number, number>
Source:

(private, non-null) videoTrackIds_ :Array.<number>

Type:
  • Array.<number>
Source:

Methods

(static) isSupported() → {boolean}

Check if the MuxJS closed caption parser is supported on this platform.
Source:
Returns:
Type
boolean

init(datanon-null)

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

parseFrom(datanon-null, onCaptions)

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
data ArrayBuffer
onCaptions function A callback function to handle the closed captions from parsed data.
Implements:
Source:

reset()

Resets the CaptionStream.
Implements:
Source: