fix setting paused=false before video is loaded on VideoPlayer;fix calling play() on VideoElement before its ready.
This commit is contained in:
parent
8c584dea18
commit
95e6e4c36f
2 changed files with 8 additions and 6 deletions
|
@ -459,10 +459,12 @@ Ox.VideoElement = function(options, self) {
|
||||||
if (self.ended) {
|
if (self.ended) {
|
||||||
that.currentTime(0);
|
that.currentTime(0);
|
||||||
}
|
}
|
||||||
self.ended = false;
|
isReady(self.$video, function(video) {
|
||||||
self.paused = false;
|
self.ended = false;
|
||||||
self.seeking = false;
|
self.paused = false;
|
||||||
self.video.play();
|
self.seeking = false;
|
||||||
|
video.play();
|
||||||
|
});
|
||||||
return that;
|
return that;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1874,9 +1874,9 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
|
|
||||||
if (!self.options.paused) {
|
if (!self.options.paused) {
|
||||||
self.options.paused = true;
|
self.options.paused = true;
|
||||||
togglePaused('button');
|
togglePaused('loadedmetadata');
|
||||||
} else if (self.options.paused && self.playOnLoad) {
|
} else if (self.options.paused && self.playOnLoad) {
|
||||||
togglePaused('button');
|
togglePaused('loadedmetadata');
|
||||||
}
|
}
|
||||||
self.$playButton && self.$playButton.options({disabled: false});
|
self.$playButton && self.$playButton.options({disabled: false});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue