mirror of
https://github.com/R0m1k3/xtremflow.git
synced 2026-10-18 04:39:41 +02:00
perf(player): implement Turbo Start for faster zapping while maintaining stability
This commit is contained in:
1 parent
9e97f45046
commit
79fae261aa
3 files changed
+18
-17
No files matched your search
+5
-5
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user