0

Wait until player is setup before we start polling for status

This commit is contained in:
Gabe Kangas 2020-06-16 21:05:54 -07:00
parent cbe37d68ce
commit b35059f17b

View File

@ -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()