Home Reference Source
import Cea608Parser from 'hls.js/src/utils/cea-608-parser.js'
public class | source

Cea608Parser

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public
public
public

dataCounters: {"padding": *, "char": *, "cmd": *, "other": *}

public

field: *

public
public
public
public
public

Method Summary

Public Methods
public

addData(t: *, byteList: *)

Add data for time t in forms of list of bytes (unsigned ints).

public

Trigger the generation of a cue, and the start of a new one if displayScreens are not empty.

public

getHandler(index: *): *

public

interpretPAC(row: *, byte: *): Object

Interpret the second byte of the pac, and return the information.

public

Parse extended background attributes as well as new foreground color black.

public

parseChars(a: *, b: *): *

Parse characters.

public

parseCmd(a: *, b: *): Boolean

Parse Command.

public

parseMidrow(a: *, b: *): Boolean

Parse midrow styling command

public

parsePAC(a: *, b: *): Boolean

Parse Preable Access Codes (Table 53).

public

reset()

Reset state of parser and its channels.

public

setHandler(index: *, newHandler: *)

Public Constructors

public constructor() source

Public Members

public bufferedData: *[] source

public channels: undefined[] source

public currChNr: * source

public dataCounters: {"padding": *, "char": *, "cmd": *, "other": *} source

public field: * source

public lastCmdA: * source

public lastCmdB: * source

public lastTime: * source

public outputs: undefined[] source

public startTime: * source

Public Methods

public addData(t: *, byteList: *) source

Add data for time t in forms of list of bytes (unsigned ints). The bytes are treated as pairs.

Params:

NameTypeAttributeDescription
t *
byteList *

public cueSplitAtTime(t: *) source

Trigger the generation of a cue, and the start of a new one if displayScreens are not empty.

Params:

NameTypeAttributeDescription
t *

public getHandler(index: *): * source

Params:

NameTypeAttributeDescription
index *

Return:

*

public interpretPAC(row: *, byte: *): Object source

Interpret the second byte of the pac, and return the information.

Params:

NameTypeAttributeDescription
row *
byte *

Return:

Object

pacData with style parameters.

public parseBackgroundAttributes(a: *, b: *): boolean source

Parse extended background attributes as well as new foreground color black. @returns{Boolean} Tells if background attributes are found

Params:

NameTypeAttributeDescription
a *
b *

Return:

boolean

public parseChars(a: *, b: *): * source

Parse characters.

Params:

NameTypeAttributeDescription
a *
b *

Return:

*

An array with 1 to 2 codes corresponding to chars, if found. null otherwise.

public parseCmd(a: *, b: *): Boolean source

Parse Command.

Params:

NameTypeAttributeDescription
a *
b *

Return:

Boolean

Tells if a command was found

public parseMidrow(a: *, b: *): Boolean source

Parse midrow styling command

Params:

NameTypeAttributeDescription
a *
b *

Return:

Boolean

public parsePAC(a: *, b: *): Boolean source

Parse Preable Access Codes (Table 53).

Params:

NameTypeAttributeDescription
a *
b *

Return:

Boolean

Tells if PAC found

public reset() source

Reset state of parser and its channels.

public setHandler(index: *, newHandler: *) source

Params:

NameTypeAttributeDescription
index *
newHandler *