From 5cbe60aaaf57e3abd2885d6dd70a73c823572f49 Mon Sep 17 00:00:00 2001 From: FireMasterK <20838718+FireMasterK@users.noreply.github.com> Date: Thu, 26 Aug 2021 02:02:56 +0530 Subject: [PATCH] Set range parameter like official client. --- src/components/Player.vue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/components/Player.vue b/src/components/Player.vue index 40af2be2..883a1048 100644 --- a/src/components/Player.vue +++ b/src/components/Player.vue @@ -122,6 +122,14 @@ export default { url.host = new URL(component.video.proxyUrl).host; request.uris[0] = url.toString(); } + if (url.pathname === "/videoplayback") { + const headers = request.headers; + if (headers.Range) { + url.searchParams.set("range", headers.Range.split("=")[1]); + request.headers = {}; + request.uris[0] = url.toString(); + } + } }); localPlayer.configure(