Skip to content

Commit

Permalink
fixing patch range header
Browse files Browse the repository at this point in the history
  • Loading branch information
unixfox committed Oct 26, 2024
1 parent a800b7d commit 1def3bd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions patches/007-range-header.patch
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
From 88fdd24e4ff8bf60ad6d71e3ecf63bd01683b308 Mon Sep 17 00:00:00 2001
From 502572edc7cb9119720a7d2bcc7c9c7a296c7875 Mon Sep 17 00:00:00 2001
From: Emilien Devos <4016501+unixfox@users.noreply.github.com>
Date: Sat, 26 Oct 2024 19:33:40 +0200
Subject: [PATCH 1/1] patch player post request
Date: Sat, 26 Oct 2024 20:23:07 +0200
Subject: [PATCH 1/1] range query string post

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

diff --git a/assets/js/player.js b/assets/js/player.js
index 353a5296..2c224743 100644
index 353a5296..d0bad747 100644
--- a/assets/js/player.js
+++ b/assets/js/player.js
@@ -42,6 +42,21 @@ embed_url = location.origin + '/embed/' + video_data.id + embed_url.search;
Expand All @@ -22,7 +22,7 @@ index 353a5296..2c224743 100644
+ options.method = 'POST'
+ options.body = new Uint8Array([0x78, 0]) // protobuf: { 15: 0 } (no idea what it means but this is what YouTube uses)
+
+ if (request.headers.Range) {
+ if (options.headers.Range) {
+ options.uri += `&range=${options.headers.Range.split('=')[1]}`
+ delete options.headers.Range
+ }
Expand Down

0 comments on commit 1def3bd

Please sign in to comment.