mirror of https://github.com/iv-org/invidious.git
send query string instead of range http header
This commit is contained in:
parent
9892604758
commit
95576555d1
|
@ -42,6 +42,15 @@ embed_url = location.origin + '/embed/' + video_data.id + embed_url.search;
|
||||||
var save_player_pos_key = 'save_player_pos';
|
var save_player_pos_key = 'save_player_pos';
|
||||||
|
|
||||||
videojs.Vhs.xhr.beforeRequest = function(options) {
|
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
|
// set local if requested not videoplayback
|
||||||
if (!options.uri.includes('videoplayback')) {
|
if (!options.uri.includes('videoplayback')) {
|
||||||
if (!options.uri.includes('local=true'))
|
if (!options.uri.includes('local=true'))
|
||||||
|
|
Loading…
Reference in New Issue