标题元素

属性类型必需示例值范围描述
cuesarraytrue--一个提示对象数组,表示文本内容、时间和相关元数据。
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, none标题文本的字母大小写转换。
alignstringtrue-left, center, right, justify标题的文本对齐方式。
bgColorstringtrue--标题的背景颜色。
bgAlphanumbertrue-0 - 1标题背景的透明度级别。1 表示完全不透明,0 表示完全透明。
bgRadiusnumbertrue--标题背景的圆角半径,以像素为单位。
focusobjectfalse--针对聚焦/强调文本的可选配置,包括样式、背景和动画设置。
inTweenobjectfalse--应用于标题出现时的 tween 动画。
outTweenobjectfalse--应用于标题消失时的 tween 动画。
displayModestringtrue--标题的显示模式,例如“完整句子”或“逐字”。
lineNumnumbertrue--标题拆分的行数。
lineMaxWordNumnumbertrue--标题每行的最大单词数。

焦点配置

focus 对象包含标题中强调或聚焦文本的设置。所有属性都是可选的。

属性类型必需示例值范围描述
styleobjectfalse--The text style applied to focused text. Contains the same properties as the Text element's textStyle object.
bgColorstringfalse--聚焦文本的背景颜色。
bgAlphanumberfalse-0 - 1聚焦文本背景的透明度级别。1 表示完全不透明,0 表示完全透明。
bgRadiusnumberfalse--聚焦文本背景的圆角半径,以像素为单位。
inTweenobjectfalse--应用于聚焦文本出现时的 tween 动画。
outTweenobjectfalse--应用于聚焦文本消失时的 tween 动画。
letterCasestringfalse-uppercase, lowercase, Title Case, none聚焦文本的字母大小写转换。

标题提示

属性类型必需示例值范围描述
idstringtrue--提示的唯一标识符。
startnumbertrue--提示的开始时间,以秒为单位。
endnumbertrue--提示的结束时间,以秒为单位。
contentstringtrue--提示的文本内容。

注意:cues 数组必须包含至少一个提示对象。textStyle 对象和 focus.style 对象(如果提供)包含与文本元素的 textStyle 对象相同的属性,包括 fontFamily、fontSize、fill(颜色)、align、lineHeight、letterSpacing、wordSpacing、fontWeight、fontStyle、textShadow、underline、strikethrough、isBold、isItalic、shadowEnabled、shadowColor、shadowBlur、shadowAlpha、shadowAngle、shadowDistance、stroke 和 strokeWidth。

captionElement.json

{
    "id": "057c61ba-3365-4624-856f-992e1b8a419a",
    "type": "Caption",
    "start": 1,
    "duration": 9,
    "trackIndex": 0,
    "x": 0,
    "y": 470,
    "blendMode": "normal",
    "anchorX": 0,
    "anchorY": 0,
    "rotation": 0,
    "scaleX": 1,
    "scaleY": 1,
    "alpha": 1,
    "skewX": 0,
    "skewY": 0,
    "keyframes": [],
    "cues": [
      {
        "start": 1,
        "end": 4,
        "content": "Winters come after Autumn.",
        "id": "dc0719f3-12c3-4e44-b127-e4f0b2ba4574"
      },
      {
        "start": 5,
        "end": 10,
        "content": "Often the weather goes too cold in winter.\nYou should cover yourself with warm clothes.",
        "id": "7f243bd6-1283-4957-b8b0-9488eec46f40"
      }
    ],
    "textStyle": {
      "fill": "#ffffff",
      "fontSize": 28,
      "fontFamily": "Arial",
      "align": "left",
      "lineHeight": 0,
      "letterSpacing": 0,
      "isBold": true,
      "isItalic": false,
      "shadowEnabled": true,
      "shadowColor": "#000000",
      "shadowBlur": 4,
      "shadowAlpha": 0.75,
      "shadowAngle": 1.2,
      "shadowDistance": 3,
      "stroke": "#000000",
      "strokeWidth": 2
    },
    "letterCase": "Title Case",
    "align": "center",
    "bgColor": "#a3e635",
    "bgAlpha": 0,
    "bgRadius": 10,
    "focus": {
      "style": {
        "fill": "#f2c9ff",
        "fontSize": 28,
        "fontFamily": "Arial",
        "align": "left",
        "lineHeight": 0,
        "letterSpacing": 0,
        "isBold": true,
        "isItalic": false,
        "shadowEnabled": false,
        "shadowColor": "",
        "shadowBlur": 0,
        "shadowAlpha": 1,
        "shadowAngle": 0,
        "shadowDistance": 0,
        "stroke": "#000000",
        "strokeWidth": 2
      },
      "bgColor": "#dd38f4",
      "bgAlpha": 1,
      "bgRadius": 10,
      "inTween": {
        "name": "Fade In",
        "duration": 1,
        "from": { "alpha": 0 },
        "to": { "alpha": 1 },
        "cp1": { "x": 0, "y": 0 },
        "cp2": { "x": 1, "y": 1 }
      },
      "letterCase": "Title Case"
    },
    "inTween": {
      "name": "Fade In",
      "duration": 1,
      "from": { "alpha": 0 },
      "to": { "alpha": 1 },
      "cp1": { "x": 0, "y": 0 },
      "cp2": { "x": 1, "y": 1 }
    },
    "displayMode": "Full Sentence",
    "lineNum": 2,
    "lineMaxWordNum": 10
  }