From a3ae89e81a397b41602716466b8a016276e7b949 Mon Sep 17 00:00:00 2001 From: qikongjian Date: Wed, 3 Sep 2025 21:38:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=AA=E6=9C=89=20iframe=20=E7=9C=9F?= =?UTF-8?q?=E6=AD=A3=E5=AE=8C=E6=88=90=E6=97=B6=E6=89=8D=E4=BC=9A=E5=AE=8C?= =?UTF-8?q?=E6=88=90=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/work-flow/ai-editing-iframe.tsx | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/components/pages/work-flow/ai-editing-iframe.tsx b/components/pages/work-flow/ai-editing-iframe.tsx index fcd8a4f..eb293ab 100644 --- a/components/pages/work-flow/ai-editing-iframe.tsx +++ b/components/pages/work-flow/ai-editing-iframe.tsx @@ -84,7 +84,6 @@ export const AIEditingIframe: React.FC = ({ const [isProcessing, setIsProcessing] = useState(false); const iframeRef = useRef(null); const progressIntervalRef = useRef(null); - const timeoutRef = useRef(null); // 构建智能剪辑URL const aiEditingUrl = `https://smartcut.movieflow.ai/ai-editor/${projectId}?token=${token}&user_id=${userId}&auto=true&embedded=true`; @@ -124,11 +123,7 @@ export const AIEditingIframe: React.FC = ({ clearInterval(progressIntervalRef.current); progressIntervalRef.current = null; } - // 清理超时 - if (timeoutRef.current) { - clearTimeout(timeoutRef.current); - timeoutRef.current = null; - } + onComplete({ videoUrl: data.videoUrl, @@ -151,11 +146,7 @@ export const AIEditingIframe: React.FC = ({ clearInterval(progressIntervalRef.current); progressIntervalRef.current = null; } - // 清理超时 - if (timeoutRef.current) { - clearTimeout(timeoutRef.current); - timeoutRef.current = null; - } + onError(data.error); break; @@ -182,11 +173,7 @@ export const AIEditingIframe: React.FC = ({ clearInterval(progressIntervalRef.current); progressIntervalRef.current = null; } - // 清理超时 - if (timeoutRef.current) { - clearTimeout(timeoutRef.current); - timeoutRef.current = null; - } + }; }, [onComplete, onError, onProgress]);