Constructor
new Cea708Service(serviceNumber)
Parameters:
| Name | Type | Description | 
|---|---|---|
| serviceNumber | number | 
- Source:
Members
Colors :Array.<string>
    An array of 8 colors that 64 colors can be quantized to. Order here matters.
    Type:
- Array.<string>
- Source:
EXT_CEA708_CTRL_CODE_BYTE1 :number
    For extended control codes in block_data on CEA-708, byte 1 is 0x10.
    Type:
- number
- Source:
G2Charset :Map.<number, string>
    Holds characters mapping for bytes that are G2 control codes.
    Type:
- Map.<number, string>
- Source:
currentWindow_ :shaka.cea.Cea708Window
    The current window for which window command operate on.
    Type:
- Source:
serviceNumber_ :number
    Number for this specific service (1 - 63).
    Type:
- number
- Source:
windows_ :Array.<?shaka.cea.Cea708Window>
    Eight Cea708 Windows, as defined by the spec.
    Type:
- Array.<?shaka.cea.Cea708Window>
- Source:
Methods
clearWindows_(windowsBitmap, pts) → {shaka.extern.ICaptionDecoder.ClosedCaption}
Parameters:
| Name | Type | Description | 
|---|---|---|
| windowsBitmap | number | |
| pts | number | 
- Source:
Returns:
defineWindow_(dtvccPacketnon-null, windowNum, pts)
Parameters:
| Name | Type | Description | 
|---|---|---|
| dtvccPacket | shaka.cea.DtvccPacket | |
| windowNum | number | |
| pts | number | 
- Source:
Throws:
deleteWindows_(windowsBitmap, pts) → {shaka.extern.ICaptionDecoder.ClosedCaption}
Parameters:
| Name | Type | Description | 
|---|---|---|
| windowsBitmap | number | |
| pts | number | 
- Source:
Returns:
displayWindows_(windowsBitmap, pts)
Parameters:
| Name | Type | Description | 
|---|---|---|
| windowsBitmap | number | |
| pts | number | 
- Source:
getSpecifiedWindowIds_(bitmap) → {Array.<number>}
    Yields each non-null window specified in the 8-bit bitmap.
    Parameters:
| Name | Type | Description | 
|---|---|---|
| bitmap | number | 8 bits corresponding to each of the 8 windows. | 
- Source:
Returns:
- Type
- Array.<number>
handleC0_(controlCode, pts) → {shaka.extern.ICaptionDecoder.ClosedCaption}
    Handles C0 group data.
    Parameters:
| Name | Type | Description | 
|---|---|---|
| controlCode | number | |
| pts | number | 
- Source:
Returns:
handleC1_(dtvccPacketnon-null, captionCommand, pts) → {shaka.extern.ICaptionDecoder.ClosedCaption}
    Processes C1 group data.
These are caption commands.
    Parameters:
| Name | Type | Description | 
|---|---|---|
| dtvccPacket | shaka.cea.DtvccPacket | |
| captionCommand | number | |
| pts | number | in seconds | 
- Source:
Throws:
- 
        a possible out-of-range buffer read.
- Type
- shaka.util.Error
Returns:
handleC2_(dtvccPacketnon-null, controlCode)
    Handles C2 group data.
    Parameters:
| Name | Type | Description | 
|---|---|---|
| dtvccPacket | shaka.cea.DtvccPacket | |
| controlCode | number | 
- Source:
handleC3_(dtvccPacketnon-null, controlCode)
    Handles C3 group data.
    Parameters:
| Name | Type | Description | 
|---|---|---|
| dtvccPacket | shaka.cea.DtvccPacket | |
| controlCode | number | 
- Source:
handleCea708ControlCode(dtvccPacketnon-null) → {shaka.extern.ICaptionDecoder.ClosedCaption}
    Processes a CEA-708 control code.
    Parameters:
| Name | Type | Description | 
|---|---|---|
| dtvccPacket | shaka.cea.DtvccPacket | 
- Source:
Throws:
Returns:
handleG0_(controlCode)
    Handles G0 group data.
    Parameters:
| Name | Type | Description | 
|---|---|---|
| controlCode | number | 
- Source:
handleG1_(controlCode)
    Handles G1 group data.
    Parameters:
| Name | Type | Description | 
|---|---|---|
| controlCode | number | 
- Source:
handleG2_(controlCode)
    Handles G2 group data.
    Parameters:
| Name | Type | Description | 
|---|---|---|
| controlCode | number | 
- Source:
handleG3_(controlCode)
    Handles G3 group data.
    Parameters:
| Name | Type | Description | 
|---|---|---|
| controlCode | number | 
- Source:
hideWindows_(windowsBitmap, pts) → {shaka.extern.ICaptionDecoder.ClosedCaption}
Parameters:
| Name | Type | Description | 
|---|---|---|
| windowsBitmap | number | |
| pts | number | 
- Source:
Returns:
reset_(pts) → {shaka.extern.ICaptionDecoder.ClosedCaption}
    Emits anything currently present in any of the windows, and then
deletes all windows, cancels all delays, reinitializes the service.
    Parameters:
| Name | Type | Description | 
|---|---|---|
| pts | number | 
- Source:
Returns:
rgbColorToHex_(red, green, blue) → {string}
    Maps 64 possible CEA-708 colors to 8 CSS colors.
    Parameters:
| Name | Type | Description | 
|---|---|---|
| red | number | value from 0-3 | 
| green | number | value from 0-3 | 
| blue | number | value from 0-3 | 
- Source:
Returns:
- Type
- string
setCurrentWindow_(windowNum)
Parameters:
| Name | Type | Description | 
|---|---|---|
| windowNum | number | 
- Source:
setPenAttributes_(dtvccPacketnon-null)
Parameters:
| Name | Type | Description | 
|---|---|---|
| dtvccPacket | shaka.cea.DtvccPacket | 
- Source:
Throws:
setPenColor_(dtvccPacketnon-null)
Parameters:
| Name | Type | Description | 
|---|---|---|
| dtvccPacket | shaka.cea.DtvccPacket | 
- Source:
Throws:
setPenLocation_(dtvccPacketnon-null)
Parameters:
| Name | Type | Description | 
|---|---|---|
| dtvccPacket | shaka.cea.DtvccPacket | 
- Source:
Throws:
setWindowAttributes_(dtvccPacketnon-null)
Parameters:
| Name | Type | Description | 
|---|---|---|
| dtvccPacket | shaka.cea.DtvccPacket | 
- Source:
Throws:
toggleWindows_(windowsBitmap, pts) → {shaka.extern.ICaptionDecoder.ClosedCaption}
Parameters:
| Name | Type | Description | 
|---|---|---|
| windowsBitmap | number | |
| pts | number | 
- Source:
Returns:
Type Definitions
Cea708Byte
    CEA-708 closed captions byte.
    Type:
- {pts: number, type: number, value: number, order: number}
Properties:
| Name | Type | Description | 
|---|---|---|
| pts | number | Presentation timestamp (in second) at which this packet was received. | 
| type | number | Type of the byte. Either 2 or 3, DTVCC Packet Data or a DTVCC Packet Start. | 
| value | number | The byte containing data relevant to the packet. | 
| order | number | A number indicating the order this packet was received in a sequence of packets. Used to break ties in a stable sorting algorithm | 
- Source: