use video prefix for clip view too
This commit is contained in:
parent
21ab5fa451
commit
de49c030c3
2 changed files with 9 additions and 6 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue