From de49c030c342f43e53a7b1af6d845a62eb3fed21 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sat, 29 Oct 2011 17:24:54 +0200 Subject: [PATCH] use video prefix for clip view too --- static/js/pandora/clipPlayer.js | 8 +++++--- static/js/pandora/itemClips.js | 7 ++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/static/js/pandora/clipPlayer.js b/static/js/pandora/clipPlayer.js index 98d32732..0bce6762 100644 --- a/static/js/pandora/clipPlayer.js +++ b/static/js/pandora/clipPlayer.js @@ -35,17 +35,19 @@ pandora.ui.clipPlayer = function() { length = range[1] - range[0], data = []; result.data.items.forEach(function(item, i) { - var id = item.id.split('/')[0] + var id = item.id.split('/')[0]; pandora.api.get({id: id, keys: ['durations']}, function(result) { //Ox.print('API get item', id, 'result', result.data); var points = [item['in'], item.out], partsAndPoints = pandora.getVideoPartsAndPoints(result.data.durations, points); data[i] = { parts: partsAndPoints.parts.map(function(i) { - return '/' + id + '/96p' + (i + 1) + '.' + pandora.user.videoFormat; + var part = (i + 1), + prefix = pandora.site.site.videoprefix.replace('PART', part); + return prefix + '/' + id + '/96p' + part + '.' + pandora.user.videoFormat; }), points: partsAndPoints.points - } + }; if (++counter == length) { callback(data); } diff --git a/static/js/pandora/itemClips.js b/static/js/pandora/itemClips.js index 82e1c5a8..b42401bb 100644 --- a/static/js/pandora/itemClips.js +++ b/static/js/pandora/itemClips.js @@ -91,8 +91,9 @@ pandora.ui.itemClips = function(options) { poster: '/' + self.options.id + '/' + self.height + 'p' + points[0] + '.jpg', rewind: true, video: partsAndPoints.parts.map(function(i) { - return '/' + self.options.id + '/96p' + (i + 1) - + '.' + pandora.user.videoFormat; + var part = (i + 1), + prefix = pandora.site.site.videoprefix.replace('PART', part); + return prefix + '/' + self.options.id + '/96p' + part + '.' + pandora.user.videoFormat; }), width: self.width }) @@ -105,4 +106,4 @@ pandora.ui.itemClips = function(options) { return that; -}; \ No newline at end of file +};