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

currentChannel: Channels

public

logger: *

Method Summary

Public Methods
public

addData(time: 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(channel: 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(channel: number, newHandler: OutputFilter)

Public Constructors

public constructor() source

Public Members

public channels: undefined[] source

public cmdHistory: * source

public currentChannel: Channels source

public logger: * source

Public Methods

public addData(time: 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
time 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(channel: number): * source

Params:

NameTypeAttributeDescription
channel 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(channel: number, newHandler: OutputFilter) source

Params:

NameTypeAttributeDescription
channel number
newHandler OutputFilter