diff --git a/src/lib/helpers/youtubePlayerHandling.ts b/src/lib/helpers/youtubePlayerHandling.ts index 11b7ae3..c91a8f9 100644 --- a/src/lib/helpers/youtubePlayerHandling.ts +++ b/src/lib/helpers/youtubePlayerHandling.ts @@ -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"; + } } } } diff --git a/src/routes/videoPlaybackProxy.ts b/src/routes/videoPlaybackProxy.ts index 9f52a87..ab84622 100644 --- a/src/routes/videoPlaybackProxy.ts +++ b/src/routes/videoPlaybackProxy.ts @@ -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",