diff --git a/source/Ox.UI/js/Video/LargeVideoTimeline.js b/source/Ox.UI/js/Video/LargeVideoTimeline.js index 7b9cedb2..3170cb00 100644 --- a/source/Ox.UI/js/Video/LargeVideoTimeline.js +++ b/source/Ox.UI/js/Video/LargeVideoTimeline.js @@ -97,17 +97,20 @@ Ox.LargeVideoTimeline = function(options, self) { setTimeout(function() { var chapters = self.options.chapters.slice(1).map(function(chapter) { - return chapter.position; - }); + return chapter.position; + }), + $cut =$('') + .addClass('OxCut') + .attr({src: Ox.UI.getImageURL('markerCut')}), + $chapter =$('') + .addClass('OxChapter') + .attr({src: Ox.UI.getImageURL('markerChapter')}); Ox.unique(chapters.concat(self.options.cuts)).forEach(function(v, i) { - self.$cuts[i] = $('') - .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 = $('')