Enable 480p in ABR - Rok synced all 3 variants (sequence base 32)

This commit is contained in:
Sebastjan 2026-04-25 15:33:22 +02:00
parent 53a1d83d43
commit f15e5a1d83

View File

@ -674,15 +674,8 @@
hls.loadSource(HLS_URL); hls.loadSource(HLS_URL);
hls.attachMedia(video); hls.attachMedia(video);
hls.on(Hls.Events.MANIFEST_PARSED, () => { hls.on(Hls.Events.MANIFEST_PARSED, () => {
try { // ABR enabled across ALL variants (1080p / 720p / 480p)
if (hls.levels && hls.levels.length) { // Rok synced all 3 variants — same MEDIA-SEQUENCE base, encoder restarted.
hls.levels.forEach((lvl) => {
if (lvl.height && lvl.height <= 480) {
lvl.enabled = false;
}
});
}
} catch (e) {}
hideMsg(); hideMsg();
video.play().catch(() => setTimeout(() => video.play().catch(() => {}), 200)); video.play().catch(() => setTimeout(() => video.play().catch(() => {}), 200));
}); });