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({
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) {
self.options.fullscreen = data.fullscreen;

View file

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

View file

@ -1272,7 +1272,7 @@ Ox.VideoPlayer = function(options, self) {
);
setPosition(self.$video.currentTime());
that.triggerEvent('durationchange', {
duration:self.options.duration
duration: self.options.duration
});
}