Skip to content

Commit

Permalink
Merge pull request #11 from podlove/hls-error-recovery
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-heimbuch authored Nov 7, 2020
2 parents b3ecc75 + 7846278 commit ad98cb2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/hls.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ export const attatchStream = media => {
hls.startLoad()
media.dispatchEvent(new CustomEvent('error', { detail: { networkState: HTMLMediaElement.NETWORK_EMPTY } }))
break
case Hls.ErrorTypes.MEDIA_ERROR:
hls.recoverMediaError();
break;
default:
hls.destroy()
media.dispatchEvent(new CustomEvent('error', { detail: { networkState: HTMLMediaElement.NETWORK_NO_SOURCE } }))
Expand Down

0 comments on commit ad98cb2

Please # to comment.