forked from 0x2620/oxjs
minor changes
This commit is contained in:
parent
2bf92c982a
commit
1bf1eae034
5 changed files with 25 additions and 16 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue