move js files from js/pandora to js, fixes #1366
This commit is contained in:
parent
b5eda32bbd
commit
a9b7738aa8
104 changed files with 7 additions and 2 deletions
29
static/js/videoPreview.js
Normal file
29
static/js/videoPreview.js
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
// vim: et:ts=4:sw=4:sts=4:ft=javascript
|
||||
|
||||
'use strict';
|
||||
|
||||
pandora.ui.videoPreview = function(data) {
|
||||
var that = Ox.VideoPreview({
|
||||
duration: data.duration,
|
||||
getFrame: function(position) {
|
||||
var resolutions = pandora.site.video.resolutions.filter(function(resolution, i) {
|
||||
return resolution >= data.height;
|
||||
}),
|
||||
resolution = resolutions.length
|
||||
? Ox.min(resolutions)
|
||||
: Ox.max(pandora.site.video.resolutions);
|
||||
return '/' + data.id + '/' + resolution + 'p' + (
|
||||
Ox.isUndefined(position) ? '' : position
|
||||
) + '.jpg';
|
||||
},
|
||||
frameRatio: data.frameRatio,
|
||||
height: data.height,
|
||||
position: data.position,
|
||||
scaleToFill: true,
|
||||
timeline: '/' + data.id + '/timeline16p.jpg',
|
||||
videoTooltip: data.videoTooltip,
|
||||
width: data.width
|
||||
});
|
||||
return that;
|
||||
};
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue