forked from 77media/video-flow
兼容 未修改 镜头描述也能重新生成视频
This commit is contained in:
parent
5e2fd1fff9
commit
b7fe03d5ee
@ -180,6 +180,8 @@ export const useShotService = (): UseShotService => {
|
|||||||
try {
|
try {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
|
|
||||||
|
console.log('shotInfo-selectedSegment', selectedSegment);
|
||||||
|
|
||||||
// 调用API重新生成视频片段,返回任务状态信息
|
// 调用API重新生成视频片段,返回任务状态信息
|
||||||
const taskResult = await vidoEditUseCase.regenerateVideoSegment(
|
const taskResult = await vidoEditUseCase.regenerateVideoSegment(
|
||||||
projectId,
|
projectId,
|
||||||
|
|||||||
@ -56,10 +56,12 @@ export const ShotTabContent = (props: ShotTabContentProps) => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (pendingRegeneration) {
|
if (pendingRegeneration) {
|
||||||
|
console.log('pendingRegeneration', pendingRegeneration, shotData[selectedIndex]?.lens);
|
||||||
regenerateVideoSegment();
|
regenerateVideoSegment();
|
||||||
setPendingRegeneration(false);
|
setPendingRegeneration(false);
|
||||||
|
setIsRegenerate(false);
|
||||||
}
|
}
|
||||||
}, [shotData[selectedIndex]?.lens]);
|
}, [pendingRegeneration]);
|
||||||
|
|
||||||
// 监听当前选中index变化
|
// 监听当前选中index变化
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@ -179,7 +181,9 @@ export const ShotTabContent = (props: ShotTabContentProps) => {
|
|||||||
...shotData[selectedIndex],
|
...shotData[selectedIndex],
|
||||||
lens: shotInfo
|
lens: shotInfo
|
||||||
});
|
});
|
||||||
|
setTimeout(() => {
|
||||||
setPendingRegeneration(true);
|
setPendingRegeneration(true);
|
||||||
|
}, 1000);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 新增分镜
|
// 新增分镜
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user