Wait until player is setup before we start polling for status
This commit is contained in:
@@ -113,7 +113,12 @@ function setupWebsocket() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setupApp()
|
setupApp()
|
||||||
getStatus()
|
|
||||||
setupWebsocket()
|
// Wait until the player is setup before we start polling status
|
||||||
setInterval(getStatus, 5000)
|
videojs.hookOnce('setup', function (player) {
|
||||||
|
getStatus();
|
||||||
|
setInterval(getStatus, 5000);
|
||||||
|
});
|
||||||
|
|
||||||
|
setupWebsocket()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user