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"],
"video": {
"formats": ["webm", "mp4"],
// fixme: this should be named "ratio" or "defaultRatio",
// as it also applies to clip lists (on load)
"previewRatio": 1.7777777778,
"resolutions": [96]
}

View file

@ -5,8 +5,7 @@
pandora.ui.clipList = function(videoRatio) {
var ui = pandora.user.ui,
// FIXME: don't hardcode 16/9
fixedRatio = !ui.item ? 16/9 : videoRatio,
fixedRatio = !ui.item ? pandora.site.video.previewRatio : videoRatio,
isClipView = !ui.item ? ui.listView == 'clip' : ui.itemView == 'clips',
isEmbed = pandora.isEmbedURL(),
that = Ox.IconList({

View file

@ -2,7 +2,7 @@
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() {
pandora.$ui.map.resizeMap();

View file

@ -9,7 +9,7 @@ pandora.ui.sequencesDialog = function() {
width: Math.round(window.innerWidth * 0.9)
},
left = getLeft(),
fixedRatio = 16/9,
fixedRatio = pandora.site.video.previewRatio,
fps = 25,
item = pandora.getItemIdAndPosition(),
itemWidth = 160,