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

Cea608Parser

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public
public

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

public

field: *

public
public
public
public

Method Summary

Public Methods
public

addData(t: undefined, byteList: undefined)

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: number): *

public

interpretPAC(row: number, byte: number): PACData

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: number, b: number): *

Parse characters.

public

Parse Command.

public

Parse midrow styling command

public

Parse Preable Access Codes (Table 53).

public

reset()

Reset state of parser and its channels.

public

setHandler(index: number, newHandler: OutputFilter)

Public Constructors

public constructor() source

Public Members

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 Methods

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

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

Params:

NameTypeAttributeDescription
t undefined
byteList undefined

public cueSplitAtTime(t: number) source

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

Params:

NameTypeAttributeDescription
t number

public getHandler(index: number): * source

Params:

NameTypeAttributeDescription
index number

Return:

*

public interpretPAC(row: number, byte: number): PACData source

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

Params:

NameTypeAttributeDescription
row number
byte number

Return:

PACData

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

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

Params:

NameTypeAttributeDescription
a number
b number

Return:

boolean

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

Parse characters.

Params:

NameTypeAttributeDescription
a number
b number

Return:

*

public parseCmd(a: number, b: number): boolean source

Parse Command.

Params:

NameTypeAttributeDescription
a number
b number

Return:

boolean

public parseMidrow(a: number, b: number): boolean source

Parse midrow styling command

Params:

NameTypeAttributeDescription
a number
b number

Return:

boolean

public parsePAC(a: number, b: number): boolean source

Parse Preable Access Codes (Table 53).

Params:

NameTypeAttributeDescription
a number
b number

Return:

boolean

public reset() source

Reset state of parser and its channels.

public setHandler(index: number, newHandler: OutputFilter) source

Params:

NameTypeAttributeDescription
index number
newHandler OutputFilter