Caption Element

PropTypeRequiredExampleValue RangeDescription
cuesarraytrue--An array of cue objects representing the text content, timings, and related metadata.
textStyleobjecttrue--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.
letterCasestringtrue-uppercase, lowercase, Title Case, noneThe letter case transformation for the caption text.
alignstringtrue-left, center, right, justifyThe text alignment of the caption.
bgColorstringtrue--The background color for the caption.
bgAlphanumbertrue-0 - 1The transparency level of the caption background. 1 represents full opacity, and 0 represents full transparency.
bgRadiusnumbertrue--The corner radius of the caption background, in pixels.
focusobjectfalse--Optional configuration for focused/emphasized text, including style, background, and animation settings.
inTweenobjectfalse--The tween animation applied to the caption when it appears.
outTweenobjectfalse--The tween animation applied to the caption when it disappears.
displayModestringtrue--The display mode of the caption, such as "Full Sentence" or "Word by Word".
lineNumnumbertrue--The number of lines the caption is split into.
lineMaxWordNumnumbertrue--The maximum number of words per line in the caption.

Focus Configuration

The focus object contains settings for emphasized or focused text within the caption. All properties are optional.

PropTypeRequiredExampleValue RangeDescription
styleobjectfalse--The text style applied to focused text. Contains the same properties as the Text element's textStyle object.
bgColorstringfalse--The background color for focused text.
bgAlphanumberfalse-0 - 1The transparency level of the focused text background. 1 represents full opacity, and 0 represents full transparency.
bgRadiusnumberfalse--The corner radius of the focused text background, in pixels.
inTweenobjectfalse--The tween animation applied to focused text when it appears.
outTweenobjectfalse--The tween animation applied to focused text when it disappears.
letterCasestringfalse-uppercase, lowercase, Title Case, noneThe letter case transformation for focused text.

Caption Cue

PropTypeRequiredExampleValue RangeDescription
idstringtrue--A unique identifier for the cue.
startnumbertrue--The start time of the cue, in seconds.
endnumbertrue--The end time of the cue, in seconds.
contentstringtrue--The text content of the cue.

Note: The cues array must contain at least one cue object. The textStyle object and focus.style object (if provided) contain the same properties as the Text element's textStyle 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.

captionElement.json
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