Prop | Type | Required | Example | Value Range | Description |
---|---|---|---|---|---|
cues | array | true | - | - | An array of cue objects representing the text content, timings, and related metadata. |
baseStyle | object | true | - | - | The base style applied to the caption, including font, color, shadow, and stroke settings. Contains the same properties as the Text element's textStyle object. |
stressStyle | object | true | - | - | The style applied to stressed or emphasized text in the caption. Contains the same properties as the Text element's textStyle object. |
baseBgColor | string | true | - | - | The background color for the base caption. |
baseBgAlpha | number | true | - | 0 - 1 | The transparency level of the base caption background. 1 represents full opacity, and 0 represents full transparency. |
baseBgRadius | number | true | - | - | The corner radius of the base caption background, in pixels. |
stressBgColor | string | true | - | - | The background color for stressed or emphasized text. |
stressBgAlpha | number | true | - | 0 - 1 | The transparency level of the stressed caption background. 1 represents full opacity, and 0 represents full transparency. |
stressBgRadius | number | true | - | - | The corner radius of the stressed caption background, in pixels. |
baseInTween | object | true | - | - | The tween animation applied to the base caption when it appears. |
stressInTween | object | true | - | - | The tween animation applied to stressed text when it appears. |
displayMode | string | true | - | - | The display mode of the caption, such as "Full Sentence" or "Word by Word". |
align | string | true | - | left, center, right, justify | The text alignment of the caption. |
baseLetterCase | string | true | - | uppercase, lowercase, none | The letter case transformation for base text. |
stressLetterCase | string | true | - | uppercase, lowercase, none | The letter case transformation for stressed text. |
lineNum | number | true | - | - | The number of lines the caption is split into. |
lineMaxWordNum | number | true | - | - | The maximum number of words per line in the caption. |
Prop | Type | Required | Example | Value Range | Description |
---|---|---|---|---|---|
id | string | true | - | - | A unique identifier for the cue. |
start | number | true | - | - | The start time of the cue, in seconds. |
end | number | true | - | - | The end time of the cue, in seconds. |
content | string | true | - | - | The text content of the cue. |
Note: The
cues
array must contain at least one cue object. ThebaseStyle
andstressStyle
objects contain the same properties as the Text element'stextStyle
object, including fontFamily, fontSize, fill (color), align, lineHeight, letterSpacing, wordSpacing, fontWeight, fontStyle, textShadow, underline, strikethrough, isBold, isItalic, shadowEnabled, shadowColor, shadowBlur, shadowAlpha, shadowAngle, shadowDistance, stroke, and strokeWidth.
1
2{
3 "id": "057c61ba-3365-4624-856f-992e1b8a419a",
4 "type": "Caption",
5 "start": 1,
6 "duration": 9,
7 "trackIndex": 0,
8 "x": 0,
9 "y": 470,
10 "blendMode": "normal",
11 "anchorX": 0,
12 "anchorY": 0,
13 "rotation": 0,
14 "scaleX": 1,
15 "scaleY": 1,
16 "alpha": 1,
17 "skewX": 0,
18 "skewY": 0,
19 "keyframes": [],
20 "cues": [
21 {
22 "start": 1,
23 "end": 4,
24 "content": "Winters come after Autumn.",
25 "id": "dc0719f3-12c3-4e44-b127-e4f0b2ba4574"
26 },
27 {
28 "start": 5,
29 "end": 10,
30 "content": "Often the weather goes too cold in winter.
31You should cover yourself with warm clothes.",
32 "id": "7f243bd6-1283-4957-b8b0-9488eec46f40"
33 }
34 ],
35 "baseStyle": {
36 "fill": "#ffffff",
37 "fontSize": 28,
38 "fontFamily": "Arial",
39 "align": "left",
40 "lineHeight": 0,
41 "letterSpacing": 0,
42 "isBold": true,
43 "isItalic": false,
44 "shadowEnabled": true,
45 "shadowColor": "#000000",
46 "shadowBlur": 4,
47 "shadowAlpha": 0.75,
48 "shadowAngle": 1.2,
49 "shadowDistance": 3,
50 "stroke": "#000000",
51 "strokeWidth": 2
52 },
53 "stressStyle": {
54 "fill": "#f2c9ff",
55 "fontSize": 28,
56 "fontFamily": "Arial",
57 "align": "left",
58 "lineHeight": 0,
59 "letterSpacing": 0,
60 "isBold": true,
61 "isItalic": false,
62 "shadowEnabled": false,
63 "shadowColor": "",
64 "shadowBlur": 0,
65 "shadowAlpha": 1,
66 "shadowAngle": 0,
67 "shadowDistance": 0,
68 "stroke": "#000000",
69 "strokeWidth": 2
70 },
71 "align": "center",
72 "baseInTween": {
73 "name": "Fade In",
74 "duration": 1,
75 "from": { "alpha": 0 },
76 "to": { "alpha": 1 },
77 "cp1": { "x": 0, "y": 0 },
78 "cp2": { "x": 1, "y": 1 }
79 },
80 "stressInTween": {
81 "name": "Fade In",
82 "duration": 1,
83 "from": { "alpha": 0 },
84 "to": { "alpha": 1 },
85 "cp1": { "x": 0, "y": 0 },
86 "cp2": { "x": 1, "y": 1 }
87 },
88 "baseBgColor": "#a3e635",
89 "baseBgAlpha": 0,
90 "baseBgRadius": 10,
91 "stressBgColor": "#dd38f4",
92 "stressBgAlpha": 1,
93 "stressBgRadius": 10,
94 "displayMode": "Full Sentence",
95 "baseLetterCase": "YoCR1fCR",
96 "stressLetterCase": "YoCR1fCR",
97 "lineNum": 2,
98 "lineMaxWordNum": 10
99 }
100