Skip to content

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

Replace timestamp for cachebuster with rand string. Closes #1781

Gabe Kangase6ad6020f15f
diff --git a/webroot/js/components/player.js b/webroot/js/components/player.js
index 53b4affaac..9f76b34b01 100644
--- a/webroot/js/components/player.js
+++ b/webroot/js/components/player.js
@@ -65,7 +65,7 @@ class OwncastPlayer {
videojs.Vhs.xhr.beforeRequest = (options) => {
if (options.uri.match('m3u8')) {
- const cachebuster = Math.round(new Date().getTime() / 1000);
+ const cachebuster = Math.random().toString(16).substr(2, 8);
options.uri = `${options.uri}?cachebust=${cachebuster}`;
}
return options;