add chapter marker, use in video edit panel
This commit is contained in:
parent
ef26d84c9a
commit
55fbe25ccc
4 changed files with 10 additions and 2 deletions
|
|
@ -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] = $('<img>')
|
||||
.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')});
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue