mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
switch to Promise.all
This commit is contained in:
parent
9932bc3eb5
commit
f65465a5ae
25 changed files with 60 additions and 80 deletions
|
@ -880,10 +880,10 @@
|
|||
return MediaController.supportsDirectPlay(v);
|
||||
});
|
||||
|
||||
$.when.apply($, promises).then(function () {
|
||||
Promise.all(promises).then(function (responses) {
|
||||
|
||||
for (var i = 0, length = versions.length; i < length; i++) {
|
||||
versions[i].enableDirectPlay = arguments[i] || false;
|
||||
versions[i].enableDirectPlay = responses[i] || false;
|
||||
}
|
||||
var optimalVersion = versions.filter(function (v) {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue