forked from 77media/video-flow
修复 未展示问题 和 接口调用问题
This commit is contained in:
parent
45f0f4fe5c
commit
aa446a40fb
@ -445,7 +445,7 @@ Please process this video editing request.`;
|
||||
{/* 左侧最终视频缩略图栏(仅桌面) */}
|
||||
{taskObject?.final?.url && (
|
||||
<div
|
||||
className="absolute -left-36 top-0 z-[50]"
|
||||
className="absolute left-0 top-0 z-[50]"
|
||||
data-alt="final-sidebar"
|
||||
>
|
||||
<div className={`flex items-start`}>
|
||||
|
||||
@ -80,7 +80,7 @@ export function H5MediaViewer({
|
||||
// 计算当前阶段类型
|
||||
const stage = (selectedView === 'final' && taskObject.final?.url)
|
||||
? 'final_video'
|
||||
: (selectedView === 'video' ? 'video' : taskObject.currentStage);
|
||||
: (!['script', 'character', 'scene'].includes(taskObject.currentStage) ? 'video' : taskObject.currentStage);
|
||||
|
||||
// 生成各阶段对应的 slides 数据
|
||||
const videoUrls = useMemo(() => {
|
||||
|
||||
@ -739,7 +739,7 @@ export const MediaViewer = React.memo(function MediaViewer({
|
||||
// 计算生效阶段:selectedView 优先于 taskObject.currentStage
|
||||
const effectiveStage = (selectedView === 'final' && taskObject.final?.url)
|
||||
? 'final_video'
|
||||
: (selectedView === 'video' ? 'video' : taskObject.currentStage);
|
||||
: (!['script', 'character', 'scene'].includes(taskObject.currentStage) ? 'video' : taskObject.currentStage);
|
||||
|
||||
// 根据当前步骤渲染对应内容
|
||||
if (effectiveStage === 'final_video') {
|
||||
@ -755,7 +755,9 @@ export const MediaViewer = React.memo(function MediaViewer({
|
||||
}
|
||||
|
||||
if (effectiveStage === 'scene' || effectiveStage === 'character') {
|
||||
return renderSketchContent([...taskObject.roles.data, ...taskObject.scenes.data][currentSketchIndex]);
|
||||
const allSketches = [...(taskObject.roles?.data || []), ...(taskObject.scenes?.data || [])];
|
||||
const currentSketch = allSketches[currentSketchIndex];
|
||||
return renderSketchContent(currentSketch);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -691,7 +691,8 @@ export function useWorkflowData({ onEditPlanGenerated, editingStatus, onExportFa
|
||||
});
|
||||
|
||||
// 设置是否需要获取流式数据
|
||||
setNeedStreamData(taskCurrent.status !== 'COMPLETED');
|
||||
// setNeedStreamData(taskCurrent.status !== 'COMPLETED');
|
||||
setNeedStreamData(true);
|
||||
|
||||
} catch (error) {
|
||||
console.error('初始化失败:', error);
|
||||
@ -704,7 +705,7 @@ export function useWorkflowData({ onEditPlanGenerated, editingStatus, onExportFa
|
||||
isLoading: false
|
||||
});
|
||||
}
|
||||
}, [episodeId, initializeFromProject]);
|
||||
}, [episodeId]);
|
||||
|
||||
// 重试生成视频
|
||||
const handleRetryVideo = async (video_id: string) => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user