replace hardcoded default video ratio

This commit is contained in:
rolux 2013-07-15 14:45:54 +00:00
parent 1d1d190522
commit 79791026b7
4 changed files with 5 additions and 4 deletions

View file

@ -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]
} }

View file

@ -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({

View file

@ -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();

View file

@ -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,