Replace timestamp for cachebuster with rand string. Closes #1781
This commit is contained in:
@@ -65,7 +65,7 @@ class OwncastPlayer {
|
|||||||
|
|
||||||
videojs.Vhs.xhr.beforeRequest = (options) => {
|
videojs.Vhs.xhr.beforeRequest = (options) => {
|
||||||
if (options.uri.match('m3u8')) {
|
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}`;
|
options.uri = `${options.uri}?cachebust=${cachebuster}`;
|
||||||
}
|
}
|
||||||
return options;
|
return options;
|
||||||
|
|||||||
Reference in New Issue
Block a user