Class: shaka.cea.Cea608Memory

Constructor

new Cea608Memory(fieldNum, channelNum)

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, b)

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(startTime, endTime) → {shaka.extern.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.extern.ICaptionDecoder.ClosedCaption

getRow() → {number}

Source:
Returns:
Type
number

getScrollSize() → {number}

Source:
Returns:
Type
number

moveRows(dst, src, count)

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(idx, count)

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

setBackgroundColor(color)

Parameters:
Name Type Description
color string
Source:

setItalics(italics)

Parameters:
Name Type Description
italics boolean
Source:

setRow(row)

Parameters:
Name Type Description
row number
Source:

setScrollSize(scrollRows)

Parameters:
Name Type Description
scrollRows number
Source:

setTextColor(color)

Parameters:
Name Type Description
color string
Source:

setUnderline(underline)

Parameters:
Name Type Description
underline boolean
Source: