1
0
Fork 0
forked from 0x2620/oxjs

minor changes

This commit is contained in:
rlx 2012-01-17 23:26:26 +05:30
commit 1bf1eae034
5 changed files with 25 additions and 16 deletions

View file

@ -107,8 +107,8 @@ Ox.SmallVideoTimeline = function(options, self) {
function getPosition(e) {
var position = (
(e.offsetX ? e.offsetX : e.clientX - $(e.target).offset().left) -
(self.options.type == 'player' ? 8 : 0)
(e.offsetX ? e.offsetX : e.clientX - $(e.target).offset().left)
- (self.options.type == 'player' ? 8 : 0)
) * self.options.duration / self.imageWidth;
return Ox.limit(position, 0, self.options.duration);
}
@ -146,12 +146,16 @@ Ox.SmallVideoTimeline = function(options, self) {
function getTooltip(e) {
var position = getPosition(e),
subtitle = getSubtitle(position);
return subtitle ? '<span class=\'OxBright\'>' + Ox.highlight(
subtitle.text, self.options.find, 'OxHighlight'
).replace(/\n/g, '<br/>') + '</span><br/>' +
Ox.formatDuration(subtitle['in'], self.options.showMilliseconds) + ' - ' +
Ox.formatDuration(subtitle['out'], self.options.showMilliseconds) :
Ox.formatDuration(position, self.options.showMilliseconds);
return subtitle
? '<span class=\'OxBright\'>' + Ox.highlight(
subtitle.text, self.options.find, 'OxHighlight'
).replace(/\n/g, '<br/>') + '</span><br/>'
+ Ox.formatDuration(
subtitle['in'], self.options.showMilliseconds
) + ' - ' + Ox.formatDuration(
subtitle['out'], self.options.showMilliseconds
)
: Ox.formatDuration(position, self.options.showMilliseconds);
}
function mousedown(e) {