use video prefix for clip view too

This commit is contained in:
j 2011-10-29 17:24:54 +02:00
parent 21ab5fa451
commit de49c030c3
2 changed files with 9 additions and 6 deletions

View file

@ -35,17 +35,19 @@ pandora.ui.clipPlayer = function() {
length = range[1] - range[0], length = range[1] - range[0],
data = []; data = [];
result.data.items.forEach(function(item, i) { 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) { pandora.api.get({id: id, keys: ['durations']}, function(result) {
//Ox.print('API get item', id, 'result', result.data); //Ox.print('API get item', id, 'result', result.data);
var points = [item['in'], item.out], var points = [item['in'], item.out],
partsAndPoints = pandora.getVideoPartsAndPoints(result.data.durations, points); partsAndPoints = pandora.getVideoPartsAndPoints(result.data.durations, points);
data[i] = { data[i] = {
parts: partsAndPoints.parts.map(function(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 points: partsAndPoints.points
} };
if (++counter == length) { if (++counter == length) {
callback(data); callback(data);
} }

View file

@ -91,8 +91,9 @@ pandora.ui.itemClips = function(options) {
poster: '/' + self.options.id + '/' + self.height + 'p' + points[0] + '.jpg', poster: '/' + self.options.id + '/' + self.height + 'p' + points[0] + '.jpg',
rewind: true, rewind: true,
video: partsAndPoints.parts.map(function(i) { video: partsAndPoints.parts.map(function(i) {
return '/' + self.options.id + '/96p' + (i + 1) var part = (i + 1),
+ '.' + pandora.user.videoFormat; prefix = pandora.site.site.videoprefix.replace('PART', part);
return prefix + '/' + self.options.id + '/96p' + part + '.' + pandora.user.videoFormat;
}), }),
width: self.width width: self.width
}) })