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) {
|
if (update) {
|
||||||
self.currentItem = 0;
|
self.currentItem = 0;
|
||||||
self.currentItemId = self.items[self.currentItem].id;
|
self.currentItemId = self.items[self.currentItem].id;
|
||||||
setCurrentVideo(function() {
|
|
||||||
that.triggerEvent('seeked');
|
|
||||||
that.triggerEvent('durationchange', {
|
|
||||||
duration: that.duration()
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!update) {
|
if (!update) {
|
||||||
|
@ -68,6 +61,14 @@ Ox.VideoElement = function(options, self) {
|
||||||
that.triggerEvent('durationchange', {
|
that.triggerEvent('durationchange', {
|
||||||
duration: that.duration()
|
duration: that.duration()
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
setCurrentVideo(function() {
|
||||||
|
that.triggerEvent('seeked');
|
||||||
|
that.triggerEvent('durationchange', {
|
||||||
|
duration: that.duration()
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -1289,6 +1289,10 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
} else {
|
} else {
|
||||||
self.loadedMetadata = true;
|
self.loadedMetadata = true;
|
||||||
setPosition(self.options.position);
|
setPosition(self.options.position);
|
||||||
|
if (self.options.paused && self.playOnLoad) {
|
||||||
|
self.playOnLoad = false;
|
||||||
|
togglePaused('button');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
that.triggerEvent('durationchange', {
|
that.triggerEvent('durationchange', {
|
||||||
duration: self.options.duration
|
duration: self.options.duration
|
||||||
|
|
Loading…
Reference in a new issue