RenderingVideo 文档
Template 元素
template clip 字段、已支持模板名与运行时边界
Template 元素
1. 结构
interface TemplateClip extends BaseClip {
type: "template";
template: string;
variant?: string;
version?: string;
data: Record<string, unknown>;
overrides?: {
data?: Record<string, unknown>;
style?: Style;
transition?: Transition;
zIndexOffset?: number;
};
}
2. 当前支持的模板名
当前文档化名称:
product-introslideshowsubtitle-videotalking-headcomparisoncountdowntext-revealnewsquotelist
3. 运行时边界
template clip 会在运行时展开为普通 clips,具体展开结构取决于模板名及其 data。
transform、style、animations、keyframes、transition 这些模板层字段,不作为稳定的子 clip 继承行为来文档化。
可使用 variant 选择模板预设参数。可使用 overrides 合并最终 data、统一覆盖展开后的非音频 clip 样式、补默认转场或调整生成 clip 的 zIndex。
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
}
}