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