add pandora.site.video.previewRatio
This commit is contained in:
parent
8c5bbfd716
commit
15534396a2
4 changed files with 5 additions and 3 deletions
|
@ -700,6 +700,7 @@
|
|||
"video": {
|
||||
"download": false,
|
||||
"formats": ["webm", "mp4"],
|
||||
"previewRatio": 1.7777777778,
|
||||
"resolutions": [96]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -602,6 +602,7 @@
|
|||
"video": {
|
||||
"download": true,
|
||||
"formats": ["webm", "mp4"],
|
||||
"previewRatio": 1.3333333333,
|
||||
"resolutions": [480, 240, 96]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -555,7 +555,7 @@ pandora.getInfoHeight = function(includeHidden) {
|
|||
);
|
||||
height = Math.min(
|
||||
isVideoPreview
|
||||
? Math.round(pandora.user.ui.sidebarSize / (16/9)) + 16
|
||||
? Math.round(pandora.user.ui.sidebarSize / pandora.site.video.previewRatio) + 16
|
||||
: pandora.user.ui.sidebarSize,
|
||||
window.innerHeight - 109 // 20 menu + 24 bar + 64 (4 closed folders) + 1 resizebar
|
||||
);
|
||||
|
|
|
@ -10,8 +10,8 @@ pandora.ui.videoPreview = function(data) {
|
|||
return resolution >= data.height;
|
||||
}),
|
||||
resolution = resolutions.length
|
||||
? Math.min(resolutions)
|
||||
: Math.max(pandora.site.video.resolutions);
|
||||
? Ox.min(resolutions)
|
||||
: Ox.max(pandora.site.video.resolutions);
|
||||
return '/' + data.id + '/' + resolution + 'p' + (
|
||||
Ox.isUndefined(position) ? '' : position
|
||||
) + '.jpg';
|
||||
|
|
Loading…
Reference in a new issue