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) {
|
||||
that.currentTime(0);
|
||||
}
|
||||
self.ended = false;
|
||||
self.paused = false;
|
||||
self.seeking = false;
|
||||
self.video.play();
|
||||
isReady(self.$video, function(video) {
|
||||
self.ended = false;
|
||||
self.paused = false;
|
||||
self.seeking = false;
|
||||
video.play();
|
||||
});
|
||||
return that;
|
||||
};
|
||||
|
||||
|
|
|
@ -1874,9 +1874,9 @@ Ox.VideoPlayer = function(options, self) {
|
|||
|
||||
if (!self.options.paused) {
|
||||
self.options.paused = true;
|
||||
togglePaused('button');
|
||||
togglePaused('loadedmetadata');
|
||||
} else if (self.options.paused && self.playOnLoad) {
|
||||
togglePaused('button');
|
||||
togglePaused('loadedmetadata');
|
||||
}
|
||||
self.$playButton && self.$playButton.options({disabled: false});
|
||||
|
||||
|
|
Loading…
Reference in a new issue