allow changing options.paused before metadata is loaded, trigger loadedmetadata event
This commit is contained in:
parent
6169a4e6ec
commit
0fc0e671e1
1 changed files with 5 additions and 5 deletions
|
@ -1689,7 +1689,7 @@ Ox.VideoPlayer = function(options, self) {
|
|||
if (self.options.enableKeyboard && self.options.focus == 'load') {
|
||||
that.gainFocus();
|
||||
}
|
||||
|
||||
that.triggerEvent('loadedmetadata');
|
||||
}
|
||||
|
||||
function loadedsubtitles() {
|
||||
|
@ -2268,13 +2268,13 @@ Ox.VideoPlayer = function(options, self) {
|
|||
}
|
||||
|
||||
function togglePaused(from) {
|
||||
if (!self.loadedMetadata) {
|
||||
return;
|
||||
}
|
||||
self.options.paused = !self.options.paused;
|
||||
self.$timeline && self.$timeline.options({
|
||||
paused: self.options.paused
|
||||
});
|
||||
if (!self.loadedMetadata) {
|
||||
return;
|
||||
}
|
||||
if (self.options.paused) {
|
||||
self.$video.pause();
|
||||
clearInterval(self.playInterval);
|
||||
|
|
Loading…
Reference in a new issue