Élément de légende

PropriétéTypeRequisExemplePlage de valeursDescription
cuesarraytrue--Un tableau d'objets d'indication représentant le contenu textuel, les horaires et les métadonnées associées.
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, noneLa transformation de casse pour le texte de la légende.
alignstringtrue-left, center, right, justifyL'alignement du texte de la légende.
bgColorstringtrue--La couleur de fond pour la légende.
bgAlphanumbertrue-0 - 1Le niveau de transparence de l'arrière-plan de la légende. 1 représente une opacité totale et 0 représente une transparence totale.
bgRadiusnumbertrue--Le rayon des coins de l'arrière-plan de la légende, en pixels.
focusobjectfalse--Configuration optionnelle pour le texte mis en évidence/focalisé, y compris les styles, l'arrière-plan et les paramètres d'animation.
inTweenobjectfalse--L'animation tween appliquée à la légende lorsqu'elle apparaît.
outTweenobjectfalse--L'animation tween appliquée à la légende lorsqu'elle disparaît.
displayModestringtrue--Le mode d'affichage de la légende, tel que "Phrase complète" ou "Mot par mot".
lineNumnumbertrue--Le nombre de lignes dans lesquelles la légende est divisée.
lineMaxWordNumnumbertrue--Le nombre maximum de mots par ligne dans la légende.

Configuration du focus

L'objet focus contient des paramètres pour le texte mis en évidence ou focalisé dans la légende. Toutes les propriétés sont optionnelles.

PropriétéTypeRequisExemplePlage de valeursDescription
styleobjectfalse--The text style applied to focused text. Contains the same properties as the Text element's textStyle object.
bgColorstringfalse--La couleur de fond pour le texte focalisé.
bgAlphanumberfalse-0 - 1Le niveau de transparence de l'arrière-plan du texte focalisé. 1 représente une opacité totale et 0 représente une transparence totale.
bgRadiusnumberfalse--Le rayon des coins de l'arrière-plan du texte focalisé, en pixels.
inTweenobjectfalse--L'animation tween appliquée au texte focalisé lorsqu'il apparaît.
outTweenobjectfalse--L'animation tween appliquée au texte focalisé lorsqu'il disparaît.
letterCasestringfalse-uppercase, lowercase, Title Case, noneLa transformation de casse pour le texte focalisé.

Indication de légende

PropriétéTypeRequisExemplePlage de valeursDescription
idstringtrue--Un identifiant unique pour l'indication.
startnumbertrue--Le temps de début de l'indication, en secondes.
endnumbertrue--Le temps de fin de l'indication, en secondes.
contentstringtrue--Le contenu textuel de l'indication.

Remarque : Le tableau cues doit contenir au moins un objet d'indication. L'objet textStyle et l'objet focus.style (si fourni) contiennent les mêmes propriétés que l'objet textStyle de l'élément Texte, y compris fontFamily, fontSize, fill (couleur), align, lineHeight, letterSpacing, wordSpacing, fontWeight, fontStyle, textShadow, underline, strikethrough, isBold, isItalic, shadowEnabled, shadowColor, shadowBlur, shadowAlpha, shadowAngle, shadowDistance, stroke et 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
  }