fix new usage with youtube.js v12 + fix av01 default usage
This commit is contained in:
parent
5aba65b89e
commit
a4519724e8
2 changed files with 7 additions and 2 deletions
|
@ -25,6 +25,6 @@ export const youtubePlayerReq = async (innertubeClient: Innertube, videoId: stri
|
|||
serviceIntegrityDimensions: {
|
||||
poToken: innertubeClient.session.po_token
|
||||
},
|
||||
innertubeClientUsed
|
||||
client: innertubeClientUsed
|
||||
});
|
||||
};
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue