VideoPreview: accept tooltip function

This commit is contained in:
rolux 2013-02-11 11:56:04 +05:30
parent 28cb9403b9
commit 61ca7657b1

View file

@ -20,7 +20,7 @@ Ox.VideoPreview = function(options, self) {
position: void 0, position: void 0,
scaleToFill: false, scaleToFill: false,
timeline: '', timeline: '',
tooltip: '', tooltip: null,
width: 256 width: 256
}) })
.options(options || {}) .options(options || {})
@ -76,7 +76,11 @@ Ox.VideoPreview = function(options, self) {
self.$frame.attr({src: self.options.getFrame(position)}); self.$frame.attr({src: self.options.getFrame(position)});
}, 250); }, 250);
return '<div style="text-align: center>"' return '<div style="text-align: center>"'
+ (self.options.tooltip ? self.options.tooltip + '<br>' : '') + (self.options.tooltip ? (
Ox.isFunction(self.options.tooltip)
? self.options.tooltip()
: self.options.tooltip
) + '<br>' : '')
+ Ox.formatDuration(position, 2) + Ox.formatDuration(position, 2)
+ '</div>'; + '</div>';
} }