From a9b8a70e8a56824a6315136c448283fe10a091d0 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Thu, 25 Jun 2020 21:56:43 -0700 Subject: [PATCH] Change the poster based on online status --- webroot/js/status.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/webroot/js/status.js b/webroot/js/status.js index ffcdb0a76..eb393b3a7 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;