feat(ai-avatar): 封面预览实时显示标题叠加效果 + getRenderJob 60s 超时 #1860
Reference in New Issue
Block a user
Delete Branch "feat/ai-avatar-cover-title-preview-v3"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
问题
1. 封面预览不显示标题文字效果
"封面&生成"面板智能封面/上传封面后只显示原始图片,标题配置(文字、字体、字号、颜色、粗斜体、描边、阴影、位置)效果无法在封面上看到。最终视频封面标题由后端 ffmpeg drawtext 叠加,前端需提供实时视觉预览。
2. getRenderJob 轮询 10s 超时
对口型+渲染链路耗时较长,getRenderJob 未显式设置 timeout 走 axios 默认 10s,控制台报
timeout of 10000ms exceeded误报任务失败。(getLipsyncJob 之前已修 60s,getRenderJob 漏了)修改(4 个文件,仅前端 ai-avatar 页面)
PanelCoverAndGenerate.tsx(核心)
titleConfigpropposition: relative;imgaspect-ratio: 9/16; object-fit: cover; width: 100%; border-radius: 12px<img>后新增绝对定位标题叠加层<div>,根据 titleConfig 实时渲染:-webkit-text-stroke(与阴影互斥)api/aiAvatar.ts
getRenderJob加{ timeout: 60000 }(与 generateSmartCover 一致)AiAvatarPage.tsx
titleConfig={state.titleConfig}AiAvatar.css
.aa-cover-previewborder-radius 8→12px.aa-cover-preview img增加 aspect-ratio:9/16 和 border-radius:12px.aa-cover-preview__loading遮罩样式不改动
验收
🚀 预览环境已部署
CI全绿,自动审批通过。
CI全绿,自动审批通过。
🗑️ 预览环境已清理
PR #1860 已关闭或合并,对应的预览环境已被清理。