perf: implement robust playback stabilization to fix choppy video

- Increased MPEG-TS stashInitialSize to 1MB for better jitter resistance
- Enabled HLS.js discontinuity nudging to prevent freezing on corrupt segments
- Smoothed latency chasing with 1.1x playback rate
- Increased HLS sync distance to 6 segments for improved stability
This commit is contained in:
Michael committed 2026-03-10 19:25:02 +01:00
1 parent bb8978efaa
commit a8d2a5446d
3 files changed
+27 -14

No files matched your search

+5 -2
View File
@@ -253,9 +253,12 @@
const isTurbo = urlParams.get('turbo') === 'true';
const hls = new Hls({
maxBufferLength: isTurbo ? 45 : 50,
maxBufferLength: 60,
enableWorker: true,
liveSyncDurationCount: isTurbo ? 3 : 4, // Improved stability
liveSyncDurationCount: 5, // Balanced for desktop
nudgeOffset: 0.2,
nudgeMaxRetries: 10,
maxLiveSyncPlaybackRate: 1.1,
// Turbo-Start specific
startLevel: isTurbo ? 0 : -1,
initialLiveManifestSize: 1,