]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
hls-plugin: destroy hls upon third err
authorkontrollanten <6680299+kontrollanten@users.noreply.github.com>
Sun, 6 Dec 2020 21:33:27 +0000 (22:33 +0100)
committerChocobozzz <chocobozzz@cpy.re>
Mon, 7 Dec 2020 07:59:08 +0000 (08:59 +0100)
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

index cf8cb824dbda2583a44787f6bcd108f4bacb29c1..ca7a341b423a2f2ac4a7376117689d548acd9b79 100644 (file)
@@ -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