Skip to main content

SubtitleSettings

Subtitle styling. camelCase, unlike the snake_case fields around it.

Every field is optional; omitted ones take the renderer's defaults. Only fontSize and strokeWidth are range-checked server-side — the rest are passed through, so an unrecognised value is ignored rather than rejected. Sending the full set is the safer habit: switching animationStyle cannot then leave a stale field behind.

fontstring

Possible values: [LilitaOne, DMSerifDisplay, Dangrek, NotoSans, Roboto, Arial, TimesNewRoman, ComicSans, Impact, Courier]

Default value: LilitaOne
fontSizenumber

Range-enforced. Outside 16–26 returns 400.

Possible values: >= 16 and <= 26

Default value: 20
colorstring

Any CSS colour.

Default value: white
strokeColorstring
Default value: black
strokeWidthnumber

Range-enforced. Outside 0–4 returns 400.

Possible values: >= 0 and <= 4

Default value: 2
textAlignstring

Possible values: [left, center, right]

Default value: center
verticalAlignstring

Possible values: [top, center, bottom]

Default value: center
marginnumber[]

Exactly four numbers — [left, top, right, bottom].

Possible values: >= 4, <= 4

Default value: [0,0,0,0]
transparentboolean

When false, backgroundColor is painted behind the text.

Default value: true
backgroundColorstring

Only visible when transparent is false.

Default value: rgba(0,0,0,0.5)
textCasestring

Possible values: [regular, uppercase, lowercase]

Default value: regular
speedMultipliernumber

Scales how quickly subtitles advance.

Default value: 1
animationStylestring

classic shows wrapped lines, one_word one word at a time, and phrase_highlight a phrase with the spoken word picked out in highlightColor.

Possible values: [classic, one_word, phrase_highlight]

Default value: classic
highlightColorstring

Only used by phrase_highlight.

Default value: #FFD700
maxPhraseWordsinteger

Only used by phrase_highlight.

Default value: 4
lineSpacingnumber

Gap between wrapped lines as a fraction of font size — 0.2 is 20%. Not meaningful for one_word, which never wraps.

Default value: 0.2
SubtitleSettings
{
"font": "LilitaOne",
"fontSize": 20,
"color": "white",
"strokeColor": "black",
"strokeWidth": 2,
"textAlign": "center",
"verticalAlign": "center",
"margin": [
0,
0,
0,
0
],
"transparent": true,
"textCase": "uppercase",
"animationStyle": "phrase_highlight",
"highlightColor": "#FFD700",
"maxPhraseWords": 4,
"lineSpacing": 0.2
}