fix 直播流追赶逻辑

This commit is contained in:
Ironsp
2026-08-05 11:05:47 +08:00
parent 04a52895d7
commit 7f195f3fc1

View File

@@ -33,13 +33,13 @@ function startLiveSync(state: HlsPlayerState) {
const currentTime = video.currentTime;
const gap = liveEdge - currentTime;
// 超过 6 秒就 seek 到 live edge 附近
if (gap > 6) {
if (gap > 300) {
video.currentTime = liveEdge - 2;
}
} catch {
// ignore
}
}, 2000);
}, 60 * 1000);
}
function stopLiveSync(state: HlsPlayerState) {