Caption Element

PropTypeRequiredExampleValue RangeDescription
cuesarray--An array of cue objects representing the text content, timings, and related metadata.
baseStyleobject--The base style applied to the caption, including font, color, shadow, and stroke settings.
stressStyleobject---The style applied to stressed or emphasized text in the caption.
baseBgColorstring---The background color for the base caption.
baseBgAlphanumber--0 - 1The transparency level of the base caption background. 1 represents full opacity, and 0 represents full transparency.
baseBgRadiusnumber---The corner radius of the base caption background, in pixels.
stressBgColorstring---The background color for stressed or emphasized text.
stressBgAlphanumber--0 - 1The transparency level of the stressed caption background. 1 represents full opacity, and 0 represents full transparency.
stressBgRadiusnumber---The corner radius of the stressed caption background, in pixels.
baseInTweenobject---The tween animation applied to the base caption when it appears.
stressInTweenobject---The tween animation applied to stressed text when it appears.
displayModestring---The display mode of the caption, such as "Full Sentence" or "Word by Word".
lineNumnumber---The number of lines the caption is split into.
lineMaxWordNumnumber---The maximum number of words per line in the caption.

Caption Cue

PropTypeRequiredExampleValue RangeDescription
startnumber--The start time of the cue, in seconds.
endnumber--The end time of the cue, in seconds.
contentstring--The text content of the cue.

Note: The cues array must contain at least one cue object. baseStyle and stressStyle are objects that contain the same properties as the text element's textStyle.

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