resolutions

This commit is contained in:
j 2011-08-16 12:13:48 +02:00
parent a4bb900a96
commit 25860c20f8

View file

@ -219,7 +219,7 @@ pandora.ui.item = function() {
} else if (pandora.user.ui.itemView == 'player') { } else if (pandora.user.ui.itemView == 'player') {
var video = result.data.stream, var video = result.data.stream,
format = $.support.video.supportedFormat(video.formats); format = $.support.video.supportedFormat(video.formats);
video.height = video.profiles[0]; video.height = video.resolutions[0];
video.width = parseInt(video.height * video.aspectRatio / 2) * 2; video.width = parseInt(video.height * video.aspectRatio / 2) * 2;
video.url = video.baseUrl + '/' + video.height + 'p.' + format; video.url = video.baseUrl + '/' + video.height + 'p.' + format;
pandora.$ui.contentPanel.replaceElement(1, pandora.$ui.player = Ox.VideoPanelPlayer({ pandora.$ui.contentPanel.replaceElement(1, pandora.$ui.player = Ox.VideoPanelPlayer({
@ -266,9 +266,9 @@ pandora.ui.item = function() {
cuts = result.data.cuts || [], cuts = result.data.cuts || [],
format = $.support.video.supportedFormat(video.formats), format = $.support.video.supportedFormat(video.formats),
streams = {}; streams = {};
video.height = video.profiles[0]; video.height = video.resolutions[0];
video.width = parseInt(video.height * video.aspectRatio / 2) * 2; video.width = parseInt(video.height * video.aspectRatio / 2) * 2;
video.profiles.forEach(function(profile) { video.resolutions.forEach(function(profile) {
streams[profile] = video.baseUrl + '/' + profile + 'p.' + format; streams[profile] = video.baseUrl + '/' + profile + 'p.' + format;
}); });
$.each(pandora.site.layers, function(i, layer) { $.each(pandora.site.layers, function(i, layer) {