From adc1f09c0dbd997f34028c1c82d1c118dc8ead80 Mon Sep 17 00:00:00 2001 From: kontrollanten <6680299+kontrollanten@users.noreply.github.com> Date: Sun, 6 Dec 2020 22:33:27 +0100 Subject: [PATCH] hls-plugin: destroy hls upon third err According to hls.js docs `hls.destroy()` should be called https://github.com/video-dev/hls.js/blob/master/docs/API.md#final-step-destroying-switching-between-streams --- client/src/assets/player/p2p-media-loader/hls-plugin.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/client/src/assets/player/p2p-media-loader/hls-plugin.ts b/client/src/assets/player/p2p-media-loader/hls-plugin.ts index cf8cb824d..ca7a341b4 100644 --- a/client/src/assets/player/p2p-media-loader/hls-plugin.ts +++ b/client/src/assets/player/p2p-media-loader/hls-plugin.ts @@ -226,6 +226,7 @@ class Html5Hlsjs { if (this.errorCounts[ Hlsjs.ErrorTypes.MEDIA_ERROR ] > 2) { console.info('bubbling media error up to VIDEOJS') + this.hls.destroy() this.tech.error = () => error this.tech.trigger('error') return -- 2.41.0