load SmallVideoTimelineImage overlay async and update in BlockVideoTimeline once loaded
This commit is contained in:
parent
13018e272e
commit
fbffadd4e5
2 changed files with 44 additions and 34 deletions
|
@ -160,6 +160,8 @@ Ox.BlockVideoTimeline = function(options, self) {
|
||||||
subtitles: Ox.clone(self.options.subtitles, true),
|
subtitles: Ox.clone(self.options.subtitles, true),
|
||||||
type: self.options.type,
|
type: self.options.type,
|
||||||
width: Math.round(self.options.duration)
|
width: Math.round(self.options.duration)
|
||||||
|
}).bindEvent({
|
||||||
|
loaded: updateTimelines
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ Ox.SmallVideoTimelineImage <f> Small Video Timeline Image
|
||||||
options <o> Options
|
options <o> Options
|
||||||
self <o> Shared private variable
|
self <o> Shared private variable
|
||||||
([options[, self]]) -> <o:Ox.Element> Small Video Timeline Image
|
([options[, self]]) -> <o:Ox.Element> Small Video Timeline Image
|
||||||
|
loaded <!> subtitle, result and selection overlays are loaded
|
||||||
@*/
|
@*/
|
||||||
Ox.SmallVideoTimelineImage = function(options, self) {
|
Ox.SmallVideoTimelineImage = function(options, self) {
|
||||||
|
|
||||||
|
@ -137,7 +138,12 @@ Ox.SmallVideoTimelineImage = function(options, self) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
self.$subtitles = $('<img>')
|
self.$subtitles = $('<img>');
|
||||||
|
self.$results = $('<img>');
|
||||||
|
self.$selection = $('<img>');
|
||||||
|
|
||||||
|
setTimeout(function() {
|
||||||
|
self.$subtitles
|
||||||
.attr({
|
.attr({
|
||||||
src: getImageURL('subtitles')
|
src: getImageURL('subtitles')
|
||||||
})
|
})
|
||||||
|
@ -149,7 +155,7 @@ Ox.SmallVideoTimelineImage = function(options, self) {
|
||||||
})
|
})
|
||||||
.appendTo(that);
|
.appendTo(that);
|
||||||
|
|
||||||
self.$results = $('<img>')
|
self.$results
|
||||||
.attr({
|
.attr({
|
||||||
src: getImageURL('results')
|
src: getImageURL('results')
|
||||||
})
|
})
|
||||||
|
@ -161,7 +167,7 @@ Ox.SmallVideoTimelineImage = function(options, self) {
|
||||||
})
|
})
|
||||||
.appendTo(that);
|
.appendTo(that);
|
||||||
|
|
||||||
self.$selection = $('<img>')
|
self.$selection
|
||||||
.attr({
|
.attr({
|
||||||
src: getImageURL('selection')
|
src: getImageURL('selection')
|
||||||
})
|
})
|
||||||
|
@ -172,6 +178,8 @@ Ox.SmallVideoTimelineImage = function(options, self) {
|
||||||
height: self.imageHeight + 'px'
|
height: self.imageHeight + 'px'
|
||||||
})
|
})
|
||||||
.appendTo(that);
|
.appendTo(that);
|
||||||
|
that.triggerEvent('loaded');
|
||||||
|
});
|
||||||
|
|
||||||
function getClipTimeline() {
|
function getClipTimeline() {
|
||||||
var $canvas, context, image,
|
var $canvas, context, image,
|
||||||
|
|
Loading…
Reference in a new issue