diff --git a/src/player.js b/src/player.js index 4e17ec8..11b43c5 100644 --- a/src/player.js +++ b/src/player.js @@ -295,13 +295,14 @@ if (Hls.isSupported()) { vidReady = true clearTimeout(retryTimeout) }) - hls.on(Hls.Events.ERROR, (e) => { + hls.on(Hls.Events.ERROR, (e,d) => { + if (!d.fatal) return // Don't attempt to recover the stream when a non-fatal error occurs vidReady = false retryTimeout = setTimeout(() => { if (vidReady) return loadSource() - }, 10000) + }, 5000) if (!vid.paused) { toggleStream()