Browse Source

Change the poster based on online status

pull/53/head
Gabe Kangas 5 years ago
parent
commit
a9b8a70e8a
  1. 8
      webroot/js/status.js

8
webroot/js/status.js

@ -21,6 +21,14 @@ async function getStatus() { @@ -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;

Loading…
Cancel
Save