fix adding,removing,sorting video items and related updates

This commit is contained in:
j 2013-07-14 10:41:30 +00:00
parent 1d3c17d4b2
commit fd7352edac
3 changed files with 9 additions and 2 deletions

View file

@ -140,7 +140,11 @@ Ox.VideoEditPanel = function(options, self) {
}) })
.bindEvent({ .bindEvent({
durationchange: function(data) { durationchange: function(data) {
that.options({duration: data.duration}); self.options.duration = data.duration;
self.$timeline && self.$timeline.replaceWith(
self.$timeline = getTimeline()
);
setPosition(self.$video.options('position'), true);
}, },
fullscreen: function(data) { fullscreen: function(data) {
self.options.fullscreen = data.fullscreen; self.options.fullscreen = data.fullscreen;

View file

@ -57,6 +57,7 @@ Ox.VideoElement = function(options, self) {
} }
} }
onLoadedMetadata(self.$video, function() { onLoadedMetadata(self.$video, function() {
that.triggerEvent('seeked');
that.triggerEvent('durationchange', { that.triggerEvent('durationchange', {
duration: that.duration() duration: that.duration()
}); });
@ -300,6 +301,8 @@ Ox.VideoElement = function(options, self) {
onLoadedMetadata(self.$video, function() { onLoadedMetadata(self.$video, function() {
self.video.currentTime = currentTime; self.video.currentTime = currentTime;
}); });
} else {
that.triggerEvent('seeked');
} }
} }