Skip to content

API Variable Subtitles

github-actions[bot] edited this page Nov 24, 2026 · 1 revision

Variable: Subtitles

const Subtitles: object;

Defined in: src/plugins/subtitles/runtime/Subtitles.ts:67

The player's subtitle settings (ADR 0357 §5).

Type Declaration

settings

Get Signature

get settings(): Readonly<SubtitleSettings>;

The settings now: the player's, else the project's first-run values.

Returns

Readonly<SubtitleSettings>

onChange()

onChange(fn): () => void;

Call fn with the settings after every change; returns the unsubscribe.

Parameters

fn

(s) => void

Returns

() => void

reset()

reset(): void;

Back to the project's first-run values; the saved values are deleted.

Returns

void

set()

set(patch): void;

Change some settings: applies at once and persists. Bad values keep the current one, with a warning each.

Parameters

patch

Partial<SubtitleSettings>

Returns

void

speaker()

speaker(id): SubtitleSpeakerLook;

How speaker id (a line table row's speaker) shows: its project.json subtitles.speakers name string in the current language (else the id as written) and its colour (null: the display's speaker colour).

Parameters

id

string

Returns

SubtitleSpeakerLook

Clone this wiki locally