mirror of
https://github.com/owncast/owncast.git
synced 2024-11-28 03:01:32 +03:00
Change the poster based on online status
This commit is contained in:
parent
20eb8287ef
commit
a9b8a70e8a
1 changed files with 8 additions and 0 deletions
|
@ -21,6 +21,14 @@ async function getStatus() {
|
||||||
? "Stream is online."
|
? "Stream is online."
|
||||||
: "Stream is offline."
|
: "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.viewerCount = status.viewerCount;
|
||||||
app.sessionMaxViewerCount = status.sessionMaxViewerCount;
|
app.sessionMaxViewerCount = status.sessionMaxViewerCount;
|
||||||
app.overallMaxViewerCount = status.overallMaxViewerCount;
|
app.overallMaxViewerCount = status.overallMaxViewerCount;
|
||||||
|
|
Loading…
Reference in a new issue