forked from Kieran/zap.stream
Only set stream offline when fatal error
This commit is contained in:
parent
9d3f5fc235
commit
4309df393c
@ -27,7 +27,7 @@ export function LiveVideoPlayer(
|
|||||||
hls.on(Hls.Events.ERROR, (event, data) => {
|
hls.on(Hls.Events.ERROR, (event, data) => {
|
||||||
console.debug(event, data);
|
console.debug(event, data);
|
||||||
const errorType = data.type;
|
const errorType = data.type;
|
||||||
if (errorType === Hls.ErrorTypes.NETWORK_ERROR) {
|
if (errorType === Hls.ErrorTypes.NETWORK_ERROR && data.fatal) {
|
||||||
hls.stopLoad();
|
hls.stopLoad();
|
||||||
hls.detachMedia();
|
hls.detachMedia();
|
||||||
setStatus(VideoStatus.Offline);
|
setStatus(VideoStatus.Offline);
|
||||||
|
Loading…
Reference in New Issue
Block a user