Only set stream offline when fatal error

This commit is contained in:
Kieran 2023-06-27 11:09:38 +01:00
parent 9d3f5fc235
commit 4309df393c
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941

View File

@ -27,7 +27,7 @@ export function LiveVideoPlayer(
hls.on(Hls.Events.ERROR, (event, data) => {
console.debug(event, data);
const errorType = data.type;
if (errorType === Hls.ErrorTypes.NETWORK_ERROR) {
if (errorType === Hls.ErrorTypes.NETWORK_ERROR && data.fatal) {
hls.stopLoad();
hls.detachMedia();
setStatus(VideoStatus.Offline);