Enable 480p in ABR (test - Stream Monitor reports SYNC=0)

This commit is contained in:
Sebastjan 2026-04-25 15:03:30 +02:00
parent cb7e78eedd
commit d33d772b2f

View File

@ -675,17 +675,8 @@
hls.loadSource(HLS_URL);
hls.attachMedia(video);
hls.on(Hls.Events.MANIFEST_PARSED, () => {
// Disable 480p variant (it's desynchronized from 1080p/720p on Rok's encoder)
// ABR will only switch between 1080p and 720p, both of which are in sync.
try {
if (hls.levels && hls.levels.length) {
hls.levels.forEach((lvl, idx) => {
if (lvl.height && lvl.height <= 480) {
lvl.enabled = false;
}
});
}
} catch (e) {}
// ABR enabled across ALL variants (1080p / 720p / 480p)
// Player will auto-pick best quality based on bandwidth.
hideMsg();
video.play().catch(() => setTimeout(() => video.play().catch(() => {}), 200));
});