Skip to content

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

Force poster to reload so it uses the recent thumbnail. #37

Gabe Kangas7c0db7c5f9b1
diff --git a/webroot/js/status.js b/webroot/js/status.js
index 54d05c5a5c..5a710c5d19 100644
--- a/webroot/js/status.js
+++ b/webroot/js/status.js
@@ -15,7 +15,6 @@ function handleStatus(status) {
app.overallMaxViewerCount = status.overallMaxViewerCount;
app.isOnline = status.online;
setVideoPoster(app.isOnline);
-
}
function handleOffline() {
diff --git a/webroot/js/utils.js b/webroot/js/utils.js
index e02e459bd9..1fa5bf2ff4 100644
--- a/webroot/js/utils.js
+++ b/webroot/js/utils.js
@@ -120,7 +120,8 @@ function generateUsername() {
function setVideoPoster(online) {
const player = videojs(VIDEO_ID);
- const poster = online ? POSTER_THUMB : POSTER_DEFAULT;
+ var cachebuster = Math.round(new Date().getTime() / 1000);
+ const poster = online ? POSTER_THUMB + "?okhi=" + cachebuster : POSTER_DEFAULT;
player.poster(poster);
}