標題元素

屬性類型必要範例值範圍描述
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--當標題出現時應用於標題的過渡動畫。
outTweenobjectfalse--當標題消失時應用於標題的過渡動畫。
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--當聚焦文本出現時應用於聚焦文本的過渡動畫。
outTweenobjectfalse--當聚焦文本消失時應用於聚焦文本的過渡動畫。
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
  }