In the hls documentation, it is recommended to use this function for error cases
case Hls.ErrorTypes.MEDIA_ERROR:
console.log("fatal media error encountered, try to recover");
hls.recoverMediaError();
break;
https://github.com/video-dev/hls.js/blob/master/docs/API.md#hlsrecovermediaerror
However, in the case of live, it takes a long time to recover the video in case of error or transmission failure. Is there a way to recover the transmission more quickly?
If you follow the documentation or demo source code you'll notice that both are suggesting to call recover media error if any media related error occurred.
After a few experiment, this is what I Prefer to resolve the errors
Besides that, you can make a function which will first call the startLoad still if the error raised then your final option should be calling recoverMediaError()