From 7d0e702f149032f84cabcdbf46e327846ba47e95 Mon Sep 17 00:00:00 2001 From: Alessandro Ros Date: Mon, 29 Jan 2024 00:25:42 +0100 Subject: [PATCH] hls: fix infinite loop in web client when reading incompatible codecs (#2956) when a player received a stream with incompatible codecs, it started polling the server for index.m3u8 in an infinite loop. This was caused by #2631 --- internal/servers/hls/index.html | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/internal/servers/hls/index.html b/internal/servers/hls/index.html index 0d12c52b..b0d13947 100644 --- a/internal/servers/hls/index.html +++ b/internal/servers/hls/index.html @@ -33,9 +33,7 @@ const create = (video) => { }); hls.on(Hls.Events.ERROR, (evt, data) => { - if (data.type === Hls.ErrorTypes.MEDIA_ERROR) - hls.recoverMediaError(); - else if (data.fatal) { + if (data.fatal) { hls.destroy(); setTimeout(() => create(video), 2000); }