From bc49b60c0bd3b442ea784959025333c0320ad361 Mon Sep 17 00:00:00 2001 From: mtvpls Date: Sun, 4 Jan 2026 23:37:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=87=E9=9B=86=E6=B8=85=E7=A9=BA=E5=BC=B9?= =?UTF-8?q?=E5=B9=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/play/page.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/app/play/page.tsx b/src/app/play/page.tsx index 4537eb0..685a290 100644 --- a/src/app/play/page.tsx +++ b/src/app/play/page.tsx @@ -559,6 +559,14 @@ function PlayPageClient() { console.log(`[弹幕] 剧集切换到第 ${currentEpisodeIndex + 1} 集,自动加载弹幕`); + // 立即清空当前弹幕 + if (danmakuPluginRef.current) { + danmakuPluginRef.current.hide(); + danmakuPluginRef.current.config({ danmuku: [] }); + danmakuPluginRef.current.load(); + setDanmakuCount(0); + } + // 自动加载弹幕的逻辑 const loadDanmakuForCurrentEpisode = async () => { const title = videoTitleRef.current;