新增 使用后端返回的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" preload="metadata"
playsInline playsInline
loop loop
poster={getFirstFrame(url)} poster={taskObject.videos.data[idx].snapshot_url || getFirstFrame(url)}
crossOrigin="anonymous" crossOrigin="anonymous"
onClick={(e) => { onClick={(e) => {
e.stopPropagation(); e.stopPropagation();

View File

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