diff --git a/README.md b/README.md
index f7d4300..2bcf914 100644
--- a/README.md
+++ b/README.md
@@ -99,7 +99,7 @@ npm start
- 新版素材库只在列表中返回 `ready` 素材;`pending` / `failed` 通过单素材接口查询。
- 视频生成应长期保存素材库返回的 `asset://...` 引用,不要依赖原始图片 URL。
- 参考图/参考视频/首帧/首尾帧属于不同互斥调用方式;本 Demo 采用“多模态参考图”方式。
-- 默认视频 720p,时长 4–15 秒;真人/数字人必须使用审核通过的 `mat_*` 素材 ID。
+- 默认视频 720p,时长可选 5–14 秒整数;真人/数字人必须使用审核通过的 `mat_*` 素材 ID。
接口依据:[快快 AI Hub 最新文档](https://ai.kkidc.com/api-docs/8238027m0)。
diff --git a/public/app.js b/public/app.js
index 27942d0..241055c 100644
--- a/public/app.js
+++ b/public/app.js
@@ -456,6 +456,8 @@ function switchModule(module) {
}
function createShot(seed = {}, index = state.shots.length) {
+ const seedDuration = Number(seed.duration);
+ const duration = Number.isFinite(seedDuration) ? Math.min(14, Math.max(5, Math.round(seedDuration))) : 5;
return {
id: seed.id || `shot-${Date.now()}-${Math.random().toString(36).slice(2, 7)}`,
title: seed.title || (index === 0 ? "电梯口对话" : `片段 ${String(index + 1).padStart(2, "0")}`),
@@ -466,7 +468,7 @@ function createShot(seed = {}, index = state.shots.length) {
roleIds: Array.isArray(seed.roleIds) ? [...seed.roleIds] : state.roles.map((role) => role.id),
model: seed.model || "doubao-seedance-2-0-260128",
ratio: seed.ratio || "9:16",
- duration: Number(seed.duration) || 5,
+ duration,
resolution: seed.resolution || "720p",
generateAudio: seed.generateAudio !== false,
watermark: Boolean(seed.watermark),
diff --git a/public/index.html b/public/index.html
index 0c562d3..ebef5c2 100644
--- a/public/index.html
+++ b/public/index.html
@@ -204,9 +204,15 @@
时长