fix changing resolution(how long was that broken?), dont seek before item is loaded
This commit is contained in:
parent
ccc50be7de
commit
4b0a55b43a
1 changed files with 5 additions and 4 deletions
|
@ -232,8 +232,7 @@ Ox.VideoElement = function(options, self) {
|
|||
}
|
||||
function set() {
|
||||
self.currentItem = item;
|
||||
self.currentPart = -1;
|
||||
setCurrentTime(0);
|
||||
setCurrentPart(self.currentPart);
|
||||
if (self.isPlaylist) {
|
||||
that.triggerEvent('pointschange');
|
||||
that.triggerEvent('sizechange');
|
||||
|
@ -282,7 +281,9 @@ Ox.VideoElement = function(options, self) {
|
|||
if (currentPart != self.currentPart) {
|
||||
setCurrentPart(currentPart);
|
||||
}
|
||||
self.video.currentTime = currentTime;
|
||||
if (self.video && self.video.readyState) {
|
||||
self.video.currentTime = currentTime;
|
||||
}
|
||||
}
|
||||
|
||||
function unloadPage(page) {
|
||||
|
@ -435,7 +436,7 @@ Ox.VideoElement = function(options, self) {
|
|||
self.options.src = Ox.isArray(arguments[0]) ? arguments[0] : [arguments[0]];
|
||||
if (self.loadedMetadata) {
|
||||
self.$video[self.currentPart].src = self.options.src[self.currentPart];
|
||||
self.$video.each(function(video, i) {
|
||||
self.$video.each(function(i, video) {
|
||||
if (i != self.currentPart) {
|
||||
var src = self.options.src[i];
|
||||
//fixme: get rid of this to make use of browser caching
|
||||
|
|
Loading…
Reference in a new issue