feat: implement Turbo-Start stream acceleration

- Add direct MPEG-TS support and optimized HLS tuning
- Implement low-latency sync and instant bitrate selection
- Achieve TiviMate-like zapping speed by reducing initial buffers
This commit is contained in:
Michael committed 2026-03-10 18:41:46 +01:00
1 parent 736ab0f51c
commit 0ca6f96710
5 files changed
+67 -18

No files matched your search

+13 -5
View File
@@ -228,13 +228,21 @@
// Android / Chrome - HLS.js
if (isHLS && Hls.isSupported()) {
log('Using Hls.js optimized for mobile');
const isTurbo = urlParams.get('turbo') === 'true';
const hls = new Hls({
maxBufferLength: 60, // More buffer for mobile stability
maxMaxBufferLength: 120,
liveSyncDurationCount: 5,
liveMaxLatencyDurationCount: 15,
maxBufferLength: isTurbo ? 30 : 60,
maxMaxBufferLength: isTurbo ? 60 : 120,
liveSyncDurationCount: isTurbo ? 2 : 5,
liveMaxLatencyDurationCount: isTurbo ? 10 : 15,
enableWorker: true,
lowLatencyMode: false // Disable low latency for continuity
lowLatencyMode: !isTurbo, // Prioritize stability unless Turbo requested
// Turbo-Start specific
startLevel: isTurbo ? 0 : -1,
initialLiveManifestSize: 1,
abrEwmaDefaultEstimate: 500000,
manifestLoadingRetryDelay: 500,
levelLoadingRetryDelay: 500
});
hls.loadSource(streamUrl);
hls.attachMedia(video);