fix new usage with youtube.js v12 + fix av01 default usage

This commit is contained in:
Emilien 2024-12-11 21:40:39 +01:00
parent 5aba65b89e
commit a4519724e8
2 changed files with 7 additions and 2 deletions

View file

@ -25,6 +25,6 @@ export const youtubePlayerReq = async (innertubeClient: Innertube, videoId: stri
serviceIntegrityDimensions: {
poToken: innertubeClient.session.po_token
},
innertubeClientUsed
client: innertubeClientUsed
});
};

View file

@ -44,7 +44,12 @@ dashManifest.get("/:videoId", async (c) => {
.streaming_data.adaptive_formats
.filter((i) => {
if (i.mime_type.includes("mp4")) {
if (i.has_video) {
if (
i.has_video &&
JSON.stringify(
videoInfo.streaming_data?.adaptive_formats,
).includes("av01")
) {
if (i.mime_type.includes("av01")) {
return true;
} else {