forked from 0x2620/pandora
replace hardcoded default video ratio
This commit is contained in:
parent
1d1d190522
commit
79791026b7
4 changed files with 5 additions and 4 deletions
|
@ -878,6 +878,8 @@
|
||||||
"userLevels": ["guest", "member", "friend", "staff", "admin"],
|
"userLevels": ["guest", "member", "friend", "staff", "admin"],
|
||||||
"video": {
|
"video": {
|
||||||
"formats": ["webm", "mp4"],
|
"formats": ["webm", "mp4"],
|
||||||
|
// fixme: this should be named "ratio" or "defaultRatio",
|
||||||
|
// as it also applies to clip lists (on load)
|
||||||
"previewRatio": 1.7777777778,
|
"previewRatio": 1.7777777778,
|
||||||
"resolutions": [96]
|
"resolutions": [96]
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,8 +5,7 @@
|
||||||
pandora.ui.clipList = function(videoRatio) {
|
pandora.ui.clipList = function(videoRatio) {
|
||||||
|
|
||||||
var ui = pandora.user.ui,
|
var ui = pandora.user.ui,
|
||||||
// FIXME: don't hardcode 16/9
|
fixedRatio = !ui.item ? pandora.site.video.previewRatio : videoRatio,
|
||||||
fixedRatio = !ui.item ? 16/9 : videoRatio,
|
|
||||||
isClipView = !ui.item ? ui.listView == 'clip' : ui.itemView == 'clips',
|
isClipView = !ui.item ? ui.listView == 'clip' : ui.itemView == 'clips',
|
||||||
isEmbed = pandora.isEmbedURL(),
|
isEmbed = pandora.isEmbedURL(),
|
||||||
that = Ox.IconList({
|
that = Ox.IconList({
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
pandora.ui.embedNavigation = function(type) {
|
pandora.ui.embedNavigation = function(type) {
|
||||||
|
|
||||||
var that = pandora.ui.navigationView(type, 16/9);
|
var that = pandora.ui.navigationView(type, pandora.site.video.previewRatio);
|
||||||
|
|
||||||
that.resizePanel = function() {
|
that.resizePanel = function() {
|
||||||
pandora.$ui.map.resizeMap();
|
pandora.$ui.map.resizeMap();
|
||||||
|
|
|
@ -9,7 +9,7 @@ pandora.ui.sequencesDialog = function() {
|
||||||
width: Math.round(window.innerWidth * 0.9)
|
width: Math.round(window.innerWidth * 0.9)
|
||||||
},
|
},
|
||||||
left = getLeft(),
|
left = getLeft(),
|
||||||
fixedRatio = 16/9,
|
fixedRatio = pandora.site.video.previewRatio,
|
||||||
fps = 25,
|
fps = 25,
|
||||||
item = pandora.getItemIdAndPosition(),
|
item = pandora.getItemIdAndPosition(),
|
||||||
itemWidth = 160,
|
itemWidth = 160,
|
||||||
|
|
Loading…
Reference in a new issue