元素参考

Template 元素

1. 结构

interface TemplateClip extends BaseClip {
  type: "template";
  template: string;
  data?: Record<string, unknown>;
}

2. 当前支持的模板名

当前文档化名称:

  • product-intro
  • slideshow
  • subtitle-video
  • talking-head
  • comparison
  • countdown
  • text-reveal
  • news
  • quote
  • list

3. 运行时边界

template clip 会在运行时展开为普通 clips,具体展开结构取决于模板名及其 data

transformstyleanimationskeyframestransition 这些模板层字段,不作为稳定的子 clip 继承行为来文档化。

4. 示例

{
  "type": "template",
  "template": "talking-head",
  "start": 0,
  "duration": 6,
  "data": {
    "src": { "$ref": "host" },
    "words": { "$ref": "sub-main" },
    "title": "Weekly Update",
    "speaker": "Alex Chen",
    "role": "Founder",
    "showLowerThird": true
  }
}