include alr=false in order to disable application redirect for now
fixes #30
This commit is contained in:
parent
6ca59654ba
commit
f318c94bd8
2 changed files with 10 additions and 4 deletions
|
@ -77,6 +77,11 @@ export const youtubePlayerParsing = async (
|
|||
delete videoData.streamingData.formats[index]
|
||||
.signatureCipher;
|
||||
}
|
||||
if (videoData.streamingData.formats[index].url.includes("alr=true")) {
|
||||
videoData.streamingData.formats[index].url.replace("alr=true", "alr=false");
|
||||
} else {
|
||||
videoData.streamingData.formats[index].url += "&alr=false";
|
||||
}
|
||||
}
|
||||
for (
|
||||
const [index, adaptive_format] of streamingData
|
||||
|
@ -96,6 +101,11 @@ export const youtubePlayerParsing = async (
|
|||
delete videoData.streamingData.adaptiveFormats[index]
|
||||
.signatureCipher;
|
||||
}
|
||||
if (videoData.streamingData.adaptiveFormats[index].url.includes("alr=true")) {
|
||||
videoData.streamingData.adaptiveFormats[index].url.replace("alr=true", "alr=false");
|
||||
} else {
|
||||
videoData.streamingData.adaptiveFormats[index].url += "&alr=false";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,10 +52,6 @@ videoPlaybackProxy.get("/", async (c) => {
|
|||
// deno-lint-ignore prefer-const
|
||||
let queryParams = new URLSearchParams(urlReq.search);
|
||||
queryParams.delete("host");
|
||||
// alr parameter is only for WEB/HTML5 clients
|
||||
if (client.includes("WEB")) {
|
||||
queryParams.append("alr", "yes");
|
||||
}
|
||||
if (rangeHeader) {
|
||||
queryParams.append(
|
||||
"range",
|
||||
|
|
Loading…
Reference in a new issue