load timeline overlays(subtitles, cuts, results) more asynchronously

This commit is contained in:
j 2014-02-02 18:48:45 +00:00
commit be9ec5a86a
2 changed files with 21 additions and 16 deletions

View file

@ -71,7 +71,7 @@ Ox.LargeVideoTimeline = function(options, self) {
.css({left: self.center + 'px'})
.appendTo(that);
setSubtitles();
setTimeout(setSubtitles);
if (self.options.showInToOut) {
if (self.options['in']) {
@ -94,13 +94,15 @@ Ox.LargeVideoTimeline = function(options, self) {
}
}
self.options.cuts.forEach(function(v, i) {
self.$cuts[i] = $('<img>')
.addClass('OxCut')
.css({left: (v * self.fps) + 'px'})
.appendTo(self.$timeline);
setTimeout(function() {
self.options.cuts.forEach(function(v, i) {
self.$cuts[i] = $('<img>')
.addClass('OxCut')
.css({left: (v * self.fps) + 'px'})
.appendTo(self.$timeline);
});
self.$timeline.find('.OxCut').attr({src: Ox.UI.getImageURL('markerCut')});
});
self.$timeline.find('.OxCut').attr({src: Ox.UI.getImageURL('markerCut')});
self.$markerPosition = $('<img>')
.addClass('OxMarkerPosition')