From eb345acb74e464f0df35446cbf63e22f7e438f1e Mon Sep 17 00:00:00 2001 From: Emilien <4016501+unixfox@users.noreply.github.com> Date: Sun, 17 Nov 2024 19:17:39 +0100 Subject: [PATCH] fix audio set was not included in the dash manifest --- src/routes/invidious_routes/dashManifest.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/routes/invidious_routes/dashManifest.ts b/src/routes/invidious_routes/dashManifest.ts index 6dfeb39..ca4c4c7 100644 --- a/src/routes/invidious_routes/dashManifest.ts +++ b/src/routes/invidious_routes/dashManifest.ts @@ -42,7 +42,21 @@ dashManifest.get("/:videoId", async (c) => { // video.js only support MP4 not WEBM videoInfo.streaming_data.adaptive_formats = videoInfo .streaming_data.adaptive_formats - .filter((i) => i.mime_type.includes("mp4") && i.mime_type.includes("av01")); + .filter((i) => { + if (i.mime_type.includes("mp4")) { + if (i.has_video) { + if (i.mime_type.includes("av01")) { + return true; + } else { + return false; + } + } else { + return true; + } + } else { + return false; + } + }); const player_response = videoInfo.page[0]; // TODO: fix include storyboards in DASH manifest file