Browse Source

Remove cache-control header from HLS queries (#118)

Also minor refactor around cachebusting

Fixes #117
pull/121/head
Matt Steele 5 years ago committed by GitHub
parent
commit
cf7ff0a820
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      webroot/js/player.js

5
webroot/js/player.js

@ -48,10 +48,7 @@ class OwncastPlayer { @@ -48,10 +48,7 @@ class OwncastPlayer {
init() {
videojs.Hls.xhr.beforeRequest = function (options) {
const cachebuster = Math.round(new Date().getTime() / 1000);
options.uri = options.uri + "?omgwtf=" + cachebuster;
options.headers = {
'Cache-Control':'no-cache'
};
options.uri = `${options.uri}?cachebust=${cachebuster}`;
return options;
};

Loading…
Cancel
Save