VideoPreview: accept tooltip function
This commit is contained in:
parent
28cb9403b9
commit
61ca7657b1
1 changed files with 6 additions and 2 deletions
|
@ -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>';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue