This commit is contained in:
wukko 2023-08-23 01:03:31 +06:00
parent 749c00a691
commit fc89cb566b
7 changed files with 15 additions and 17 deletions

View file

@ -1,7 +1,7 @@
import { genericUserAgent } from "../../config.js";
function bestQuality(arr) {
return arr.filter((v) => { if (v["content_type"] === "video/mp4") return true }).sort((a, b) => Number(b.bitrate) - Number(a.bitrate))[0]["url"]
return arr.filter(v => v["content_type"] === "video/mp4").sort((a, b) => Number(b.bitrate) - Number(a.bitrate))[0]["url"]
}
export default async function(obj) {