switch to new get api results

This commit is contained in:
rlx 2011-08-19 14:43:05 +00:00
commit 09ee5fc417
10 changed files with 55 additions and 67 deletions

View file

@ -2,14 +2,14 @@
pandora.ui.videoPreview = function(data) {
var frameWidth = pandora.user.ui.sidebarSize,
frameHeight = Math.round(frameWidth / data.video.aspectRatio),
frameHeight = Math.round(frameWidth / data.ratio),
that = Ox.VideoPreview({
duration: data.video.duration,
duration: data.duration,
getFrame: function(position) {
var width = pandora.user.ui.sidebarSize,
height = Math.round(width / pandora.user.infoRatio),
resolution = Ox.filter(pandora.site.resolutions, function(resolution, i) {
return resolution >= height || i == pandora.site.resolutions.length - 1;
resolution = Ox.filter(pandora.site.video.resolutions, function(resolution, i) {
return resolution >= height || i == pandora.site.video.resolutions.length - 1;
})[0];
return '/' + data.id + '/' + resolution + 'p' + (
Ox.isUndefined(position) ? '' : position