forked from 77media/video-flow
get_status接口去掉水印 task 获取
This commit is contained in:
parent
b38369c0c7
commit
554ba94e5d
@ -316,11 +316,16 @@ export function useWorkflowData({}: UseWorkflowDataProps = {}) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 合成视频
|
// 合成视频就有水印
|
||||||
if (task.task_name === 'combiner_videos') {
|
if (task.task_name === 'combiner_videos') {
|
||||||
if (task.task_status === 'COMPLETED') {
|
if (task.task_status === 'COMPLETED') {
|
||||||
combinerVideoUrl = task.task_result.video_url;
|
taskCurrent.currentStage = 'final_video';
|
||||||
combinerVideoPoster = task.task_result.snapshot_url;
|
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') {
|
if (task.task_status === 'FAILED' || task.task_status === 'ERROR') {
|
||||||
taskCurrent.status = 'FAILED';
|
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_name === 'generate_final_video') {
|
||||||
if (task.task_result && task.task_result.video) {
|
if (task.task_result && task.task_result.video) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user