diff --git a/components/pages/work-flow/use-workflow-data.tsx b/components/pages/work-flow/use-workflow-data.tsx index 4258ea4..bd983e7 100644 --- a/components/pages/work-flow/use-workflow-data.tsx +++ b/components/pages/work-flow/use-workflow-data.tsx @@ -316,11 +316,16 @@ export function useWorkflowData({}: UseWorkflowDataProps = {}) { } } - // 合成视频 + // 合成视频就有水印 if (task.task_name === 'combiner_videos') { if (task.task_status === 'COMPLETED') { - combinerVideoUrl = task.task_result.video_url; - combinerVideoPoster = task.task_result.snapshot_url; + taskCurrent.currentStage = 'final_video'; + taskCurrent.final.url = task.task_result.video_url; + taskCurrent.final.note = 'combiner'; + taskCurrent.final.snapshot_url = task.task_result.snapshot_url; + taskCurrent.status = 'COMPLETED'; + // 停止轮询 + setNeedStreamData(false); } if (task.task_status === 'FAILED' || task.task_status === 'ERROR') { taskCurrent.status = 'FAILED'; @@ -329,32 +334,6 @@ export function useWorkflowData({}: UseWorkflowDataProps = {}) { } } - // 水印视频 - if (task.task_name === 'watermark_videos') { - if (task.task_status === 'COMPLETED') { - taskCurrent.currentStage = 'final_video'; - const videoUrl = task.task_result.video_url; - taskCurrent.final.url = (videoUrl && typeof videoUrl === 'object') - ? videoUrl.result?.watermarked_url - : videoUrl; - taskCurrent.final.note = 'watermark'; - taskCurrent.final.snapshot_url = combinerVideoPoster; - taskCurrent.status = 'COMPLETED'; - // 停止轮询 - setNeedStreamData(false); - } - if (task.task_status === 'FAILED' || task.task_status === 'ERROR') { - // 使用合成视频地址 - taskCurrent.currentStage = 'final_video'; - taskCurrent.final.url = combinerVideoUrl; - taskCurrent.final.note = 'combiner'; - taskCurrent.final.snapshot_url = combinerVideoPoster; - taskCurrent.status = 'COMPLETED'; - // 停止轮询 - setNeedStreamData(false); - } - } - // 最终剪辑 if (task.task_name === 'generate_final_video') { if (task.task_result && task.task_result.video) {