Prop | Type | Required | Example | Value Range | Description |
---|---|---|---|---|---|
cues | array | true | - | - | An array of cue objects representing the text content, timings, and related metadata. |
textStyle | object | true | - | - | The base text style applied to the caption, including font, color, shadow, and stroke settings. Contains the same properties as the Text element's textStyle object. |
letterCase | string | true | - | uppercase, lowercase, Title Case, none | The letter case transformation for the caption text. |
align | string | true | - | left, center, right, justify | The text alignment of the caption. |
bgColor | string | true | - | - | The background color for the caption. |
bgAlpha | number | true | - | 0 - 1 | The transparency level of the caption background. 1 represents full opacity, and 0 represents full transparency. |
bgRadius | number | true | - | - | The corner radius of the caption background, in pixels. |
focus | object | false | - | - | Optional configuration for focused/emphasized text, including style, background, and animation settings. |
inTween | object | false | - | - | The tween animation applied to the caption when it appears. |
outTween | object | false | - | - | The tween animation applied to the caption when it disappears. |
displayMode | string | true | - | - | The display mode of the caption, such as "Full Sentence" or "Word by Word". |
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. |
The focus
object contains settings for emphasized or focused text within the caption. All properties are optional.
Prop | Type | Required | Example | Value Range | Description |
---|---|---|---|---|---|
style | object | false | - | - | The text style applied to focused text. Contains the same properties as the Text element's textStyle object. |
bgColor | string | false | - | - | The background color for focused text. |
bgAlpha | number | false | - | 0 - 1 | The transparency level of the focused text background. 1 represents full opacity, and 0 represents full transparency. |
bgRadius | number | false | - | - | The corner radius of the focused text background, in pixels. |
inTween | object | false | - | - | The tween animation applied to focused text when it appears. |
outTween | object | false | - | - | The tween animation applied to focused text when it disappears. |
letterCase | string | false | - | uppercase, lowercase, Title Case, none | The letter case transformation for focused text. |
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. ThetextStyle
object andfocus.style
object (if provided) 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.\nYou should cover yourself with warm clothes.",
31 "id": "7f243bd6-1283-4957-b8b0-9488eec46f40"
32 }
33 ],
34 "textStyle": {
35 "fill": "#ffffff",
36 "fontSize": 28,
37 "fontFamily": "Arial",
38 "align": "left",
39 "lineHeight": 0,
40 "letterSpacing": 0,
41 "isBold": true,
42 "isItalic": false,
43 "shadowEnabled": true,
44 "shadowColor": "#000000",
45 "shadowBlur": 4,
46 "shadowAlpha": 0.75,
47 "shadowAngle": 1.2,
48 "shadowDistance": 3,
49 "stroke": "#000000",
50 "strokeWidth": 2
51 },
52 "letterCase": "Title Case",
53 "align": "center",
54 "bgColor": "#a3e635",
55 "bgAlpha": 0,
56 "bgRadius": 10,
57 "focus": {
58 "style": {
59 "fill": "#f2c9ff",
60 "fontSize": 28,
61 "fontFamily": "Arial",
62 "align": "left",
63 "lineHeight": 0,
64 "letterSpacing": 0,
65 "isBold": true,
66 "isItalic": false,
67 "shadowEnabled": false,
68 "shadowColor": "",
69 "shadowBlur": 0,
70 "shadowAlpha": 1,
71 "shadowAngle": 0,
72 "shadowDistance": 0,
73 "stroke": "#000000",
74 "strokeWidth": 2
75 },
76 "bgColor": "#dd38f4",
77 "bgAlpha": 1,
78 "bgRadius": 10,
79 "inTween": {
80 "name": "Fade In",
81 "duration": 1,
82 "from": { "alpha": 0 },
83 "to": { "alpha": 1 },
84 "cp1": { "x": 0, "y": 0 },
85 "cp2": { "x": 1, "y": 1 }
86 },
87 "letterCase": "Title Case"
88 },
89 "inTween": {
90 "name": "Fade In",
91 "duration": 1,
92 "from": { "alpha": 0 },
93 "to": { "alpha": 1 },
94 "cp1": { "x": 0, "y": 0 },
95 "cp2": { "x": 1, "y": 1 }
96 },
97 "displayMode": "Full Sentence",
98 "lineNum": 2,
99 "lineMaxWordNum": 10
100 }
101