forked from 77media/video-flow
watermark_videos
This commit is contained in:
parent
5543c388e2
commit
f22af3df3a
@ -439,35 +439,37 @@ export function useWorkflowData({ onEditPlanGenerated, editingStatus, onExportFa
|
||||
}
|
||||
}
|
||||
|
||||
// 粗剪
|
||||
if (task.task_name === 'generate_final_simple_video') {
|
||||
if (task.task_result && task.task_result.video) {
|
||||
taskCurrent.currentStage = 'final_video';
|
||||
taskCurrent.final.url = task.task_result.video;
|
||||
taskCurrent.final.note = 'simple';
|
||||
taskCurrent.status = 'COMPLETED';
|
||||
}
|
||||
}
|
||||
|
||||
// generate_export_video
|
||||
if (task.task_name === 'generate_export_video' || task.task_name === 'combiner_videos') {
|
||||
// 合成视频
|
||||
if (task.task_name === 'combiner_videos') {
|
||||
if (task.task_status === 'COMPLETED') {
|
||||
taskCurrent.currentStage = 'final_video';
|
||||
taskCurrent.final.url = task.task_result.video;
|
||||
taskCurrent.final.note = task.task_name === 'generate_export_video' ? 'export' : 'combiner';
|
||||
taskCurrent.final.note = 'combiner';
|
||||
taskCurrent.status = 'COMPLETED';
|
||||
// 停止轮询
|
||||
setNeedStreamData(false);
|
||||
}
|
||||
if (task.task_status === 'FAILED' || task.task_status === 'ERROR') {
|
||||
console.log('----------视频导出失败');
|
||||
taskCurrent.status = 'FAILED';
|
||||
|
||||
// 触发导出失败回调
|
||||
if (onExportFailed) {
|
||||
onExportFailed();
|
||||
}
|
||||
// 停止轮询
|
||||
setNeedStreamData(false);
|
||||
}
|
||||
}
|
||||
|
||||
// 水印视频
|
||||
if (task.task_name === 'watermark_videos') {
|
||||
if (task.task_status === 'COMPLETED') {
|
||||
taskCurrent.currentStage = 'final_video';
|
||||
taskCurrent.final.url = task.task_result.video;
|
||||
taskCurrent.final.note = 'watermark';
|
||||
taskCurrent.status = 'COMPLETED';
|
||||
// 停止轮询
|
||||
setNeedStreamData(false);
|
||||
}
|
||||
if (task.task_status === 'FAILED' || task.task_status === 'ERROR') {
|
||||
// 停止轮询
|
||||
setNeedStreamData(false);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user