mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-10 11:38:25 +01:00
Update video.js
This commit is contained in:
parent
8fa21c1ed9
commit
3125ccacf2
1 changed files with 7 additions and 8 deletions
|
@ -24,14 +24,13 @@ class videoFetchManager{
|
||||||
var json = xmltojson.toJson(text);
|
var json = xmltojson.toJson(text);
|
||||||
let parser = JSON.parse(json);
|
let parser = JSON.parse(json);
|
||||||
const fetching = parser
|
const fetching = parser
|
||||||
var j = fetching.Player.Formats.Format
|
const j = fetching.Player.Formats.Format,
|
||||||
if(j[1].URL){
|
j_ = Array.isArray(j)
|
||||||
var url = j[1].URL
|
? j[j.length - 1]
|
||||||
} else if(j[1].URL){
|
: j;
|
||||||
var s = j.formats
|
let url;
|
||||||
const lastItem = s[s.length - 1];
|
if (j_.URL != undefined)
|
||||||
var url = lastItem.URL
|
url = j_.URL;
|
||||||
}
|
|
||||||
return url
|
return url
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue