Skip to content

Class: CaptionScreen ​

Defined in: CaptionScreen.ts:51

Keep a CTA-608 screen of 32x15 styled characters

Constructors ​

Constructor ​

ts
new CaptionScreen(logger?): CaptionScreen;

Defined in: CaptionScreen.ts:58

Parameters ​

logger? ​

CaptionsLogger = ...

Returns ​

CaptionScreen

Properties ​

rows ​

ts
rows: Row[] = [];

Defined in: CaptionScreen.ts:52

Methods ​

backSpace() ​

ts
backSpace(): void;

Defined in: CaptionScreen.ts:100

Returns ​

void


clearToEndOfRow() ​

ts
clearToEndOfRow(): void;

Defined in: CaptionScreen.ts:105

Returns ​

void


copy() ​

ts
copy(other): void;

Defined in: CaptionScreen.ts:83

Parameters ​

other ​

CaptionScreen

Returns ​

void


equals() ​

ts
equals(other): boolean;

Defined in: CaptionScreen.ts:72

Parameters ​

other ​

CaptionScreen

Returns ​

boolean


getDisplayText() ​

ts
getDisplayText(asOneRow?): string;

Defined in: CaptionScreen.ts:215

Get all non-empty rows with as unicode text.

Parameters ​

asOneRow? ​

boolean

Returns ​

string


getTextAndFormat() ​

ts
getTextAndFormat(): Row[];

Defined in: CaptionScreen.ts:241

Returns ​

Row[]


insertChar() ​

ts
insertChar(char): void;

Defined in: CaptionScreen.ts:113

Insert a character (without styling) in the current row.

Parameters ​

char ​

number

Returns ​

void


isEmpty() ​

ts
isEmpty(): boolean;

Defined in: CaptionScreen.ts:89

Returns ​

boolean


moveCursor() ​

ts
moveCursor(relPos): void;

Defined in: CaptionScreen.ts:123

Parameters ​

relPos ​

number

Returns ​

void


reset() ​

ts
reset(): void;

Defined in: CaptionScreen.ts:65

Returns ​

void


rollUp() ​

ts
rollUp(): void;

Defined in: CaptionScreen.ts:199

Returns ​

void


setBkgData() ​

ts
setBkgData(bkgData): void;

Defined in: CaptionScreen.ts:188

Set background/extra foreground, but first do back_space, and then insert space (backwards compatibility).

Parameters ​

bkgData ​

Partial<PenStyles>

Returns ​

void


setCursor() ​

ts
setCursor(absPos): void;

Defined in: CaptionScreen.ts:128

Parameters ​

absPos ​

number

Returns ​

void


setPAC() ​

ts
setPAC(pacData): void;

Defined in: CaptionScreen.ts:134

Parameters ​

pacData ​

PACData

Returns ​

void


setPen() ​

ts
setPen(styles): void;

Defined in: CaptionScreen.ts:118

Parameters ​

styles ​

Partial<PenStyles>

Returns ​

void


setRollUpRows() ​

ts
setRollUpRows(nrRows): void;

Defined in: CaptionScreen.ts:195

Parameters ​

nrRows ​

number | null

Returns ​

void

A Streaming Video Technology Alliance project.