mirror of
https://github.com/videojs/video.js.git
synced 2024-12-29 02:57:21 +02:00
Close GH-727: Fixed windowLoaded not setting on async script load. Fixes #727
This commit is contained in:
parent
a49213e20c
commit
a94259cc73
@ -53,9 +53,13 @@ vjs.autoSetupTimeout = function(wait){
|
||||
setTimeout(vjs.autoSetup, wait);
|
||||
};
|
||||
|
||||
vjs.one(window, 'load', function(){
|
||||
if (document.readyState === 'complete') {
|
||||
vjs.windowLoaded = true;
|
||||
});
|
||||
} else {
|
||||
vjs.one(window, 'load', function(){
|
||||
vjs.windowLoaded = true;
|
||||
});
|
||||
}
|
||||
|
||||
// Run Auto-load players
|
||||
// You have to wait at least once in case this script is loaded after your video in the DOM (weird behavior only with minified version)
|
||||
|
Loading…
Reference in New Issue
Block a user