切集清空弹幕

This commit is contained in:
mtvpls
2026-01-04 23:37:47 +08:00
parent 6c7c69624d
commit bc49b60c0b

View File

@@ -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;