Files
selfrelease 2d847e154f chore: 初始化仓库
中华文明全图鉴——文物全图系统(PC Web 地图 + NestJS API + 管理后台)。
含三大 IP(文物南迁北归 / 国宝海外回归 / 博物馆手艺人)、AI 文物对话、
文物地图与详情、以及 demo-video-kit 演示视频生成工具。
2026-06-13 20:55:44 +08:00

37 lines
1.4 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// 演示视频配置示例。复制到你的项目,按需修改 baseUrl 与 steps。
// 运行:node <kit>/src/cli.mjs path/to/demo.config.mjs --out out
export default {
baseUrl: "http://localhost:3000",
viewport: { width: 1440, height: 900 },
brand: "我的产品 · 功能演示",
outDir: "demo-video-out",
// 配音:DashScope qwen-ttsapiKeyEnv 指定从哪个环境变量/.env 键读取密钥
voice: { name: "Cherry", model: "qwen-tts", apiKeyEnv: "AI_API_KEY", fallbackVoice: "Tingting" },
intro: { narration: "欢迎使用我的产品。下面用一分钟带你看完核心功能。" },
outro: { narration: "以上就是核心功能演示,感谢观看。" },
// 每一步:label 用于日志/兜底字幕;narration 是字幕+配音文案;run 执行操作
// ctx = { page, pause(ms), say(text) }page 为 Playwright Page
steps: [
{
label: "搜索",
narration: "在顶部搜索框输入关键词,即可快速定位。",
run: async ({ page, pause }) => {
await page.getByPlaceholder("搜索").fill("示例");
await pause(1500);
},
},
{
label: "打开详情",
narration: "点击任意条目,右侧展开它的详细信息。",
run: async ({ page, pause }) => {
await page.getByRole("button", { name: "查看" }).first().click();
await pause(1500);
},
},
],
};