faster timeline markers
This commit is contained in:
parent
be043b545b
commit
5f69fd35df
1 changed files with 10 additions and 7 deletions
|
@ -98,16 +98,19 @@ Ox.LargeVideoTimeline = function(options, self) {
|
|||
setTimeout(function() {
|
||||
var chapters = self.options.chapters.slice(1).map(function(chapter) {
|
||||
return chapter.position;
|
||||
});
|
||||
}),
|
||||
$cut =$('<img>')
|
||||
.addClass('OxCut')
|
||||
.attr({src: Ox.UI.getImageURL('markerCut')}),
|
||||
$chapter =$('<img>')
|
||||
.addClass('OxChapter')
|
||||
.attr({src: Ox.UI.getImageURL('markerChapter')});
|
||||
Ox.unique(chapters.concat(self.options.cuts)).forEach(function(v, i) {
|
||||
self.$cuts[i] = $('<img>')
|
||||
.addClass(Ox.contains(chapters, v) ? 'OxChapter' : 'OxCut')
|
||||
self.$cuts[i] = (Ox.contains(chapters, v) ? $chapter : $cut)
|
||||
.clone()
|
||||
.css({left: (v * self.fps) + 'px'})
|
||||
.appendTo(self.$timeline);
|
||||
});
|
||||
// performs better
|
||||
self.$timeline.find('.OxChapter').attr({src: Ox.UI.getImageURL('markerChapter')});
|
||||
self.$timeline.find('.OxCut').attr({src: Ox.UI.getImageURL('markerCut')});
|
||||
});
|
||||
|
||||
self.$markerPosition = $('<img>')
|
||||
|
|
Loading…
Reference in a new issue