Skip to content

Commit 58dbfe9

Browse files
committed
perf: 自动弹幕获取失败提示
1 parent e5cdbf5 commit 58dbfe9

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/app/play/page.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import { getRequestTimeout, getVideoResolutionFromM3u8 } from '@/lib/utils';
3030

3131
import DanmakuSelector from '@/components/DanmakuSelector';
3232
import EpisodeSelector from '@/components/EpisodeSelector';
33+
import { triggerGlobalError } from '@/components/GlobalErrorIndicator';
3334
import PageLayout from '@/components/PageLayout';
3435

3536
// 扩展 HTMLVideoElement 类型以支持 hls 属性
@@ -944,9 +945,12 @@ function PlayPageClient() {
944945
setSelectedDanmakuAnime(animeOption);
945946
setSelectedDanmakuSource(platform);
946947

948+
}else {
949+
triggerGlobalError("自动加载弹幕失败,请手动选择弹幕源");
947950
}
948951
} catch (err) {
949952
console.error("初始化自动加载弹幕失败:", err);
953+
triggerGlobalError("自动加载弹幕失败,请手动选择弹幕源");
950954
} finally {
951955
setIsDanmakuLoading(false);
952956
}

0 commit comments

Comments
 (0)