Skip to content

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

Change the poster based on online status

Gabe Kangas84f94de593d4
diff --git a/webroot/js/status.js b/webroot/js/status.js
index ffcdb0a76e..eb393b3a73 100644
--- a/webroot/js/status.js
+++ b/webroot/js/status.js
@@ -21,6 +21,14 @@ async function getStatus() {
? "Stream is online."
: "Stream is offline."
+ const player = videojs('video');
+ if (app.isOnline) {
+ player.poster('/thumbnail.jpg');
+ } else {
+ // Change this to some kind of offline image.
+ player.poster('/img/logo.png');
+ }
+
app.viewerCount = status.viewerCount;
app.sessionMaxViewerCount = status.sessionMaxViewerCount;
app.overallMaxViewerCount = status.overallMaxViewerCount;