diff --git a/tauri-app/src/pages/VideoGeneration/index.tsx b/tauri-app/src/pages/VideoGeneration/index.tsx index 98d188e..6af91fc 100644 --- a/tauri-app/src/pages/VideoGeneration/index.tsx +++ b/tauri-app/src/pages/VideoGeneration/index.tsx @@ -323,8 +323,16 @@ export default function VideoGeneration() { // 处理素材匹配(单个镜头触发匹配) const handleMatchMaterial = async (shotId: string) => { const result = await matchSingleMaterial(shotId); - if (result && Number(shotId) === activeScene) { + if (!result) { + return; + } + if (Number(shotId) === activeScene) { + // 当前镜头已激活,直接播放 setPreviewVideoUrl(result.url); + } else { + // 切换到该镜头,useEffect 会自动加载预览 + setActiveScene(Number(shotId)); + setIsComposedPreview(false); } };