forked from 0x2620/oxjs
fix switching resolution
This commit is contained in:
parent
e8d4961db6
commit
d27ce4de70
2 changed files with 12 additions and 7 deletions
|
|
@ -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()
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue