send query string instead of range http header

This commit is contained in:
Emilien 2024-11-20 15:21:45 +01:00
parent 9892604758
commit 95576555d1

View File

@ -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'))