diff --git a/source/Ox.UI/css/Ox.UI.css b/source/Ox.UI/css/Ox.UI.css index a2dbb821..2905e28f 100644 --- a/source/Ox.UI/css/Ox.UI.css +++ b/source/Ox.UI/css/Ox.UI.css @@ -2328,6 +2328,7 @@ Video position: absolute; top: 4px; } +.OxLargeVideoTimeline .OxChapter, .OxLargeVideoTimeline .OxCut { position: absolute; top: 62px; diff --git a/source/Ox.UI/js/Video/LargeVideoTimeline.js b/source/Ox.UI/js/Video/LargeVideoTimeline.js index 16d15044..0d1df8fd 100644 --- a/source/Ox.UI/js/Video/LargeVideoTimeline.js +++ b/source/Ox.UI/js/Video/LargeVideoTimeline.js @@ -13,6 +13,7 @@ Ox.LargeVideoTimeline = function(options, self) { self = self || {}; var that = Ox.Element({}, self) .defaults({ + chapters: [], cuts: [], disabled: false, duration: 0, @@ -95,13 +96,15 @@ Ox.LargeVideoTimeline = function(options, self) { } setTimeout(function() { - self.options.cuts.forEach(function(v, i) { + var chapters = self.options.chapters.slice(1); + Ox.unique(chapters.concat(self.options.cuts)).forEach(function(v, i) { self.$cuts[i] = $('') - .addClass('OxCut') + .addClass(Ox.contains(chapters, v) ? 'OxChapter' : 'OxCut') .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')}); }); diff --git a/source/Ox.UI/js/Video/VideoEditPanel.js b/source/Ox.UI/js/Video/VideoEditPanel.js index 21be2931..2f9f4740 100644 --- a/source/Ox.UI/js/Video/VideoEditPanel.js +++ b/source/Ox.UI/js/Video/VideoEditPanel.js @@ -460,6 +460,7 @@ Ox.VideoEditPanel = function(options, self) { function getTimeline() { return Ox.LargeVideoTimeline({ + chapters: self.chapters, cuts: self.cuts, duration: self.options.duration, getImageURL: self.options.getLargeTimelineURL, diff --git a/source/Ox.UI/svg/markerChapter.svg b/source/Ox.UI/svg/markerChapter.svg new file mode 100644 index 00000000..a967b034 --- /dev/null +++ b/source/Ox.UI/svg/markerChapter.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file