From 1d2858aa22115551c16692f3abf427a12ee5ef55 Mon Sep 17 00:00:00 2001 From: Evert Prants Date: Wed, 23 Oct 2019 17:46:49 +0300 Subject: [PATCH] try this --- src/player.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/player.js b/src/player.js index 11b43c5..146a48b 100644 --- a/src/player.js +++ b/src/player.js @@ -175,11 +175,13 @@ function toggleStream () { if (!vidReady) return if (vid.paused) { if (ws) ws.send('watch ' + STREAM_NAME) + hls.startLoad(-1) vid.play() btn.innerHTML = '' showBigBtn(false) } else { if (ws) ws.send('stop ' + STREAM_NAME) + hls.stopLoad() vid.pause() btn.innerHTML = '' showBigBtn(true) @@ -293,6 +295,7 @@ if (Hls.isSupported()) { loadSource() hls.on(Hls.Events.MANIFEST_PARSED, () => { vidReady = true + hls.stopLoad() clearTimeout(retryTimeout) }) hls.on(Hls.Events.ERROR, (e,d) => {