新增 使用后端返回的snapshot

This commit is contained in:
moux1024 2025-10-14 22:30:19 +08:00
parent 79b7f43c0f
commit 8fdc91440b
2 changed files with 3 additions and 1 deletions

View File

@ -235,7 +235,7 @@ export function H5MediaViewer({
preload="metadata"
playsInline
loop
poster={getFirstFrame(url)}
poster={taskObject.videos.data[idx].snapshot_url || getFirstFrame(url)}
crossOrigin="anonymous"
onClick={(e) => {
e.stopPropagation();

View File

@ -332,6 +332,7 @@ export function useWorkflowData({}: UseWorkflowDataProps = {}) {
? videoUrl.result?.watermarked_url
: videoUrl;
taskCurrent.final.note = 'watermark';
taskCurrent.final.snapshot_url = combinerVideoPoster;
taskCurrent.status = 'COMPLETED';
// 停止轮询
setNeedStreamData(false);
@ -354,6 +355,7 @@ export function useWorkflowData({}: UseWorkflowDataProps = {}) {
taskCurrent.currentStage = 'final_video';
taskCurrent.final.url = task.task_result.video;
taskCurrent.final.note = 'final';
taskCurrent.final.snapshot_url = combinerVideoPoster;
taskCurrent.status = 'COMPLETED';
// 停止轮询