You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently when a fatal error is thrown and cannot be recovered, _hls.destroy() is called, tech.error is set, and the error event is triggered. This basically halts all playback, forces an error display on the player, and makes recovery nearly impossible.
In some cases people may want to implement their own recovery logic - particularly if they have unique insights into the reason for the failure, or a special fallback case. In my case, a stream had two different M3U8 URLs. When one failed to play, the other could be used as a backup (different cameras for the same event). I therefore wishes to intercept the HLS error event and, if fatal, switch to the other camera, seek to the same currentTime(), and continue playback.
It would be nice if the entire _onError method were optional, perhaps with something like:
In particular, I would even like to prevent videojs-hlsjs-plugin from calling _hls.recoverMediaError(), as this unloads and reloads the video, putting a play button in front of the user - which is rather confusing during a live stream (and arguably confusing even during VOD without any messaging to explain why their video just started over)
Currently when a fatal error is thrown and cannot be recovered,
_hls.destroy()
is called,tech.error
is set, and theerror
event is triggered. This basically halts all playback, forces an error display on the player, and makes recovery nearly impossible.In some cases people may want to implement their own recovery logic - particularly if they have unique insights into the reason for the failure, or a special fallback case. In my case, a stream had two different M3U8 URLs. When one failed to play, the other could be used as a backup (different cameras for the same event). I therefore wishes to intercept the HLS
error
event and, if fatal, switch to the other camera, seek to the samecurrentTime()
, and continue playback.It would be nice if the entire
_onError
method were optional, perhaps with something like:The text was updated successfully, but these errors were encountered: