1
0
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:
Jon Mumm 2013-09-09 12:21:00 -07:00 committed by Steve Heffernan
parent a49213e20c
commit a94259cc73

View File

@ -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)