diff --git a/assets/js/player.js b/assets/js/player.js index 353a5296..e89232aa 100644 --- a/assets/js/player.js +++ b/assets/js/player.js @@ -42,6 +42,15 @@ embed_url = location.origin + '/embed/' + video_data.id + embed_url.search; var save_player_pos_key = 'save_player_pos'; videojs.Vhs.xhr.beforeRequest = function(options) { + if (options.uri.includes("videoplayback")) { + if (options.headers) { + if (options.headers.Range) { + options.uri += `&range=${options.headers.Range.split('=')[1]}` + delete options.headers.range + } + } + } + // set local if requested not videoplayback if (!options.uri.includes('videoplayback')) { if (!options.uri.includes('local=true'))