Wait until player is setup before we start polling for status
This commit is contained in:
parent
cbe37d68ce
commit
b35059f17b
@ -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()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user