use Ox.sort
This commit is contained in:
parent
0a03240033
commit
8439d56339
1 changed files with 2 additions and 2 deletions
|
@ -223,8 +223,8 @@ pandora.ui.uploadVideoDialog = function(data) {
|
||||||
var height = info.video && info.video.length
|
var height = info.video && info.video.length
|
||||||
? info.video[0].height
|
? info.video[0].height
|
||||||
: Ox.max(pandora.site.video.resolutions),
|
: Ox.max(pandora.site.video.resolutions),
|
||||||
resolution = pandora.site.video.resolutions
|
resolution = Ox.sort(pandora.site.video.resolutions)
|
||||||
.sort().filter(function(resolution) {
|
.filter(function(resolution) {
|
||||||
return height <= resolution;
|
return height <= resolution;
|
||||||
})[0] || Ox.max(pandora.site.video.resolutions);
|
})[0] || Ox.max(pandora.site.video.resolutions);
|
||||||
return resolution;
|
return resolution;
|
||||||
|
|
Loading…
Reference in a new issue