Merge pull request #567 from MoYingJi/fix-ldc

fix(player): 修复极端状态下播放异常
This commit is contained in:
底层用户
2025-11-14 09:29:01 +08:00
committed by GitHub

View File

@@ -912,6 +912,10 @@ class Player {
console.warn("⚠️ Player not ready for seek");
return;
}
if (time < 0 || time > this.player.duration()) {
console.warn("⚠️ Invalid seek time", time);
time = Math.max(0, Math.min(time, this.player.duration()));
}
this.player.seek(time);
statusStore.currentTime = time;
}