1
0
Fork 0

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
This commit is contained in:
kontrollanten 2020-12-06 22:33:27 +01:00 committed by Chocobozzz
parent 59bc5f7dc0
commit adc1f09c0d
1 changed files with 1 additions and 0 deletions

View 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