fix changing resolution(how long was that broken?), dont seek before item is loaded

This commit is contained in:
j 2013-03-02 08:56:15 +00:00
parent ccc50be7de
commit 4b0a55b43a

View file

@ -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,8 +281,10 @@ Ox.VideoElement = function(options, self) {
if (currentPart != self.currentPart) {
setCurrentPart(currentPart);
}
if (self.video && self.video.readyState) {
self.video.currentTime = currentTime;
}
}
function unloadPage(page) {
//page = Ox.mod(page, self.numberOfPages);
@ -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