Class: shaka.cea.Cea608Memory

Constructor

new Cea608Memory(fieldNumnon-null, channelNumnon-null)

Parameters:
Name Type Description
fieldNum number Field number.
channelNum number Channel number.
Source:

Members

CC_ROWS :number

Maximum number of rows in the buffer.
Type:
  • number
Source:

CharSet :number

Characters sets.
Type:
  • number
Source:

backgroundColor_ :string

Type:
  • string
Source:

channelNum_ :number

Channel number.
Type:
  • number
Source:

fieldNum_ :number

Field number.
Type:
  • number
Source:

italics_ :boolean

Type:
  • boolean
Source:

row_ :number

Current row.
Type:
  • number
Source:

rows_ :Array.<!Array.<!shaka.cea.CeaUtils.StyledChar>>

Buffer for storing decoded characters.
Type:
Source:

scrollRows_ :number

Number of rows in the scroll window. Used for rollup mode.
Type:
  • number
Source:

textColor_ :string

Type:
  • string
Source:

underline_ :boolean

Type:
  • boolean
Source:

Methods

addChar(setnon-null, bnon-null)

Adds a character to the buffer.
Parameters:
Name Type Description
set shaka.cea.Cea608Memory.CharSet Character set.
b number CC byte to add.
Source:

eraseBuffer()

Erases entire memory buffer. Doesn't change scroll state or number of rows.
Source:

eraseChar()

Erases a character from the buffer.
Source:

forceEmit(startTimenon-null, endTimenon-null) → {shaka.cea.ICaptionDecoder.ClosedCaption}

Emits a closed caption based on the state of the buffer.
Parameters:
Name Type Description
startTime number Start time of the cue.
endTime number End time of the cue.
Source:
Returns:
Type
shaka.cea.ICaptionDecoder.ClosedCaption

getRow() → {number}

Source:
Returns:
Type
number

getScrollSize() → {number}

Source:
Returns:
Type
number

moveRows(dstnon-null, srcnon-null, countnon-null)

Moves rows of characters.
Parameters:
Name Type Description
dst number Destination row index.
src number Source row index.
count number Count of rows to move.
Source:

reset()

Resets the memory buffer.
Source:

resetAllRows()

Resets the entire memory buffer.
Source:

resetRows(idxnon-null, countnon-null)

Resets rows of characters.
Parameters:
Name Type Description
idx number Starting index.
count number Count of rows to reset.
Source:

setBackgroundColor(colornon-null)

Parameters:
Name Type Description
color string
Source:

setItalics(italicsnon-null)

Parameters:
Name Type Description
italics boolean
Source:

setRow(rownon-null)

Parameters:
Name Type Description
row number
Source:

setScrollSize(scrollRowsnon-null)

Parameters:
Name Type Description
scrollRows number
Source:

setTextColor(colornon-null)

Parameters:
Name Type Description
color string
Source:

setUnderline(underlinenon-null)

Parameters:
Name Type Description
underline boolean
Source: