Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

Wait until player is setup before we start polling for status

Gabe Kangasb35059f17b82
diff --git a/webroot/js/app.js b/webroot/js/app.js
index 9bfcbeff26..904a6fecbf 100644
--- a/webroot/js/app.js
+++ b/webroot/js/app.js
@@ -113,7 +113,12 @@ function setupWebsocket() {
}
setupApp()
-getStatus()
+
+// Wait until the player is setup before we start polling status
+videojs.hookOnce('setup', function (player) {
+ getStatus();
+ setInterval(getStatus, 5000);
+});
+
setupWebsocket()
-setInterval(getStatus, 5000)