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:
parent
8cc53b114b
commit
5c62905ce5
1 changed files with 2 additions and 21 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue