1
0
Fork 0
mirror of https://codeberg.org/ashley/poke.git synced 2024-11-17 02:34:38 -05:00

Update src/libpoketube/init/pages-video.js

This commit is contained in:
ashley 2024-07-03 21:00:40 +00:00
parent 8cc53b114b
commit 5c62905ce5

View file

@ -243,28 +243,9 @@ module.exports = function (app, config, renderTemplate) {
const videoObject = inv_vid?.adaptiveFormats;
function findItag(adaptiveFormats) {
let itag298 = null;
let itag136 = null;
adaptiveFormats.forEach((format) => {
if (format.itag == 298) {
itag298 = format;
}
if (format.itag == 136) {
itag136 = format;
}
});
if (itag298 && itag136) {
return { itag298, itag136 };
} else if (itag298) {
return itag298;
} else if (itag136) {
return itag136;
} else {
return null;
}
return;
}
const itag_hd = findItag(videoObject);
var proxyurl = config.p_url;
var vidurl = u.url;