Check if the video object still exists before restarting the timeout
parent
7f40690820
commit
a1a101c0f1
|
@ -102,12 +102,15 @@ async function render(path, s){
|
|||
//root
|
||||
case "/":
|
||||
render('/users/live');
|
||||
modifyLinks();
|
||||
break;
|
||||
case "":
|
||||
render('/users/live');
|
||||
modifyLinks();
|
||||
break;
|
||||
case "/index.html":
|
||||
render('/users/live');
|
||||
modifyLinks();
|
||||
break;
|
||||
//404
|
||||
default:
|
||||
|
@ -215,6 +218,7 @@ async function initPlayer(usr) {
|
|||
onError(e);
|
||||
}
|
||||
} else {
|
||||
if(document.getElementById('video') !== null)
|
||||
setTimeout(initPlayer, 5000, usr);
|
||||
}
|
||||
}
|
||||
|
|
Reference in New Issue