fix audio set was not included in the dash manifest

This commit is contained in:
Emilien 2024-11-17 19:17:39 +01:00
parent f0012c8fb1
commit eb345acb74

View file

@ -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