From f0012c8fb1b842d2b27c137de9791ac4cd83bc45 Mon Sep 17 00:00:00 2001 From: Emilien <4016501+unixfox@users.noreply.github.com> Date: Sun, 17 Nov 2024 19:02:31 +0100 Subject: [PATCH] fix issues with invidious video player --- src/routes/invidious_routes/dashManifest.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/routes/invidious_routes/dashManifest.ts b/src/routes/invidious_routes/dashManifest.ts index a050b39..6dfeb39 100644 --- a/src/routes/invidious_routes/dashManifest.ts +++ b/src/routes/invidious_routes/dashManifest.ts @@ -38,9 +38,11 @@ dashManifest.get("/:videoId", async (c) => { c.header("content-type", "application/dash+xml"); if (videoInfo.streaming_data) { + // Invidious force quality only support one video codec at a time, using av01. + // video.js only support MP4 not WEBM videoInfo.streaming_data.adaptive_formats = videoInfo .streaming_data.adaptive_formats - .filter((i) => i.mime_type.includes("mp4")); + .filter((i) => i.mime_type.includes("mp4") && i.mime_type.includes("av01")); const player_response = videoInfo.page[0]; // TODO: fix include storyboards in DASH manifest file