Constructor
new ClosedCaptionParser(mimeType)
Parameters:
| Name | Type | Description | 
|---|---|---|
mimeType | 
            
            string | 
- Implements:
 - Source:
 
Members
decoderFactory_ :shaka.extern.CaptionDecoderPlugin
Type:
parserMap_ :Object.<string, shaka.extern.CeaParserPlugin>
Type:
- Object.<string, shaka.extern.CeaParserPlugin>
 
ceaDecoder_ :shaka.extern.ICaptionDecoder
    Decoder for decoding CEA-X08 data from closed caption packets.
    Type:
ceaParser_ :shaka.extern.ICeaParser
Type:
Methods
findDecoder() → {shaka.extern.CaptionDecoderPlugin}
Returns:
findParser(mimeType) → {shaka.extern.CeaParserPlugin}
Parameters:
| Name | Type | Description | 
|---|---|---|
mimeType | 
            
            string | 
Returns:
registerDecoder(pluginnon-null)
Parameters:
| Name | Type | Description | 
|---|---|---|
plugin | 
            
            shaka.extern.CaptionDecoderPlugin | 
registerParser(mimeType, pluginnon-null)
Parameters:
| Name | Type | Description | 
|---|---|---|
mimeType | 
            
            string | |
plugin | 
            
            shaka.extern.CeaParserPlugin | 
unregisterDecoder()
unregisterParser(mimeType)
Parameters:
| Name | Type | Description | 
|---|---|---|
mimeType | 
            
            string | 
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: