fix switching resolution

This commit is contained in:
j 2014-02-13 06:47:10 +00:00
parent e8d4961db6
commit d27ce4de70
2 changed files with 12 additions and 7 deletions

View file

@ -54,13 +54,6 @@ Ox.VideoElement = function(options, self) {
if (update) {
self.currentItem = 0;
self.currentItemId = self.items[self.currentItem].id;
setCurrentVideo(function() {
that.triggerEvent('seeked');
that.triggerEvent('durationchange', {
duration: that.duration()
});
});
}
}
if (!update) {
@ -68,6 +61,14 @@ Ox.VideoElement = function(options, self) {
that.triggerEvent('durationchange', {
duration: that.duration()
});
} else {
setCurrentVideo(function() {
that.triggerEvent('seeked');
that.triggerEvent('durationchange', {
duration: that.duration()
});
});
}
}
});

View file

@ -1289,6 +1289,10 @@ Ox.VideoPlayer = function(options, self) {
} else {
self.loadedMetadata = true;
setPosition(self.options.position);
if (self.options.paused && self.playOnLoad) {
self.playOnLoad = false;
togglePaused('button');
}
}
that.triggerEvent('durationchange', {
duration: self.options.duration