Skip to content

Commit

Permalink
add PR 5087
Browse files Browse the repository at this point in the history
  • Loading branch information
unixfox committed Nov 20, 2024
1 parent 1f3b045 commit 3d4c89b
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions patches/025-5087.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
From 95576555d18669521799289f990aeeaa7cc72220 Mon Sep 17 00:00:00 2001
From: Emilien <[email protected]>
Date: Wed, 20 Nov 2024 15:21:45 +0100
Subject: [PATCH] send query string instead of range http header

---
assets/js/player.js | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/assets/js/player.js b/assets/js/player.js
index 353a52963..e89232aa4 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'))

0 comments on commit 3d4c89b

Please sign in to comment.