Open stevendesu opened 5 years ago
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: