mirror of
https://git.waldn.net/git/knotteye/satyr.git
synced 2025-09-08 11:52:45 +00:00
Check if the video object still exists before restarting the timeout
This commit is contained in:
@ -102,12 +102,15 @@ async function render(path, s){
|
|||||||
//root
|
//root
|
||||||
case "/":
|
case "/":
|
||||||
render('/users/live');
|
render('/users/live');
|
||||||
|
modifyLinks();
|
||||||
break;
|
break;
|
||||||
case "":
|
case "":
|
||||||
render('/users/live');
|
render('/users/live');
|
||||||
|
modifyLinks();
|
||||||
break;
|
break;
|
||||||
case "/index.html":
|
case "/index.html":
|
||||||
render('/users/live');
|
render('/users/live');
|
||||||
|
modifyLinks();
|
||||||
break;
|
break;
|
||||||
//404
|
//404
|
||||||
default:
|
default:
|
||||||
@ -215,7 +218,8 @@ async function initPlayer(usr) {
|
|||||||
onError(e);
|
onError(e);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
setTimeout(initPlayer, 5000, usr);
|
if(document.getElementById('video') !== null)
|
||||||
|
setTimeout(initPlayer, 5000, usr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user