Constructor
new ClosedCaptionParser(mimeType)
Parameters:
Name |
Type |
Description |
mimeType |
string
|
|
- Implements:
- Source:
Members
Decoder for decoding CEA-X08 data from closed caption packets.
Type:
- Source:
currentContinuityTimeline_ :number
Type:
- Source:
Methods
registerDecoder(pluginnon-null)
Parameters:
- Source:
registerParser(mimeType, pluginnon-null)
Parameters:
- Source:
unregisterDecoder()
- Source:
unregisterParser(mimeType)
Parameters:
Name |
Type |
Description |
mimeType |
string
|
|
- Source:
getStreams() → {Array.<string>}
Returns the streams that the CEA decoder found.
- Implements:
- Source:
Returns:
-
Type
-
Array.<string>
init(initSegment, adaptationopt, continuityTimelineopt)
Initialize the caption parser. This should be called whenever new init
segment arrives.
Parameters:
Name |
Type |
Attributes |
Default |
Description |
initSegment |
BufferSource
|
|
|
|
adaptation |
boolean
|
<optional>
|
false
|
True if we just automatically switched active
variant(s). |
continuityTimeline |
number
|
<optional>
|
|
the optional continuity timeline |
- Implements:
- Source:
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>
remove(timelinesToKeep)
Remove items from the decoder cache based on the provided continuity
timelines. Caches relating to provided timelines are kept and the rest
are discarded.
Parameters:
Name |
Type |
Description |
timelinesToKeep |
Array.<number>
|
|
- Implements:
- Source:
reset()
Resets the CaptionStream.
- Implements:
- Source: