diff --git a/web/player.html b/web/player.html
index 95f0ef6..8ae8c97 100644
--- a/web/player.html
+++ b/web/player.html
@@ -255,16 +255,16 @@
const hls = new Hls({
maxBufferLength: 120,
enableWorker: true,
- liveSyncDurationCount: 10, // Increased for desktop stability
+ liveSyncDurationCount: 3, // Reduced for faster initial sync
nudgeOffset: 0.4,
nudgeMaxRetries: 15,
maxLiveSyncPlaybackRate: 1.15,
// Turbo-Start specific
- startLevel: isTurbo ? 0 : -1,
+ startLevel: 0, // Force lowest level for instant start
initialLiveManifestSize: 1,
abrEwmaDefaultEstimate: 500000,
- manifestLoadingRetryDelay: 1000,
- levelLoadingRetryDelay: 1000
+ manifestLoadingRetryDelay: 500,
+ levelLoadingRetryDelay: 500
});
window.hlsInstance = hls;
hls.loadSource(url);
@@ -292,7 +292,7 @@
if (!mpegts.isSupported()) return false;
const player = mpegts.createPlayer({ type: 'mpegts', isLive: isLive, url: url }, {
enableWorker: true,
- stashInitialSize: 512 * 1024,
+ stashInitialSize: 64 * 1024, // Turbo Start: 64KB initial buffer
maxStashSize: 20 * 1024 * 1024 // 20MB buffer capacity
});
player.attachMediaElement(video);
diff --git a/web/player_lite.html b/web/player_lite.html
index f539e61..90987e1 100644
--- a/web/player_lite.html
+++ b/web/player_lite.html
@@ -248,7 +248,7 @@
maxBufferLength: 120, // Doubled for stability
maxMaxBufferLength: 240,
enableWorker: true,
- liveSyncDurationCount: 12, // Increased distance from live edge (TiviMate style) for high latency
+ liveSyncDurationCount: 3, // Reduced for faster initial sync
liveMaxLatencyDurationCount: 40,
lowLatencyMode: false, // Disabled for better stability on laggy connections
// Robustness features
@@ -256,11 +256,11 @@
nudgeMaxRetries: 20,
maxLiveSyncPlaybackRate: 1.2, // Smooth catch-up
// Turbo-Start specific
- startLevel: isTurbo ? 0 : -1,
+ startLevel: 0, // Force lowest level for instant start
initialLiveManifestSize: 1,
abrEwmaDefaultEstimate: 500000,
- manifestLoadingRetryDelay: 1000,
- levelLoadingRetryDelay: 1000
+ manifestLoadingRetryDelay: 500,
+ levelLoadingRetryDelay: 500
});
window.hlsInstance = hls;
@@ -296,7 +296,7 @@
url: url
}, {
enableWorker: true,
- stashInitialSize: 512 * 1024,
+ stashInitialSize: 64 * 1024, // Turbo Start: 64KB initial buffer
enableStashBuffer: true,
liveBufferLatencyChasing: true,
liveBufferLatencyChasingOnPaused: true,
diff --git a/web/player_mobile.html b/web/player_mobile.html
index 7cd629e..8504b2b 100644
--- a/web/player_mobile.html
+++ b/web/player_mobile.html
@@ -233,8 +233,8 @@
const hls = new Hls({
maxBufferLength: 60,
maxMaxBufferLength: 120,
- liveSyncDurationCount: 6,
- liveMaxLatencyDurationCount: 20,
+ liveSyncDurationCount: 3, // Reduced for faster initial sync on mobile
+ liveMaxLatencyDurationCount: 15,
enableWorker: true,
lowLatencyMode: true,
// Robustness
@@ -242,11 +242,11 @@
nudgeMaxRetries: 10,
maxLiveSyncPlaybackRate: 1.1,
// Turbo-Start specific
- startLevel: isTurbo ? 0 : -1,
+ startLevel: 0, // Force lowest level for instant start
initialLiveManifestSize: 1,
abrEwmaDefaultEstimate: 500000,
- manifestLoadingRetryDelay: 800,
- levelLoadingRetryDelay: 800
+ manifestLoadingRetryDelay: 500,
+ levelLoadingRetryDelay: 500
});
hls.loadSource(streamUrl);
hls.attachMedia(video);
@@ -271,8 +271,9 @@
url: streamUrl
}, {
enableWorker: true,
- stashInitialSize: 2 * 1024 * 1024,
- enableStashBuffer: true
+ stashInitialSize: 128 * 1024, // Turbo Start: 128KB initial buffer
+ enableStashBuffer: true,
+ maxStashSize: 20 * 1024 * 1024 // 20MB Max for stability
});
player.attachMediaElement(video);
player.load();