1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-05 10:49:36 +02:00

Fix iframe load

This commit is contained in:
Daniel 2022-01-25 14:55:37 -03:00
parent 68dd011b8a
commit d39b2471a5

View file

@ -1352,15 +1352,17 @@ function avideoModalIframeWithClassName(url, className, updateURL) {
avideoModalIframeFullScreenOriginalURL = false; avideoModalIframeFullScreenOriginalURL = false;
} }
}); });
$('body > div.swal-overlay iframe').load(function(){ setTimeout(function () {
clearTimout(avideoModalIframeWithClassNameTimeout); $('body > div.swal-overlay iframe').load(function(){
avideoModalIframeRemove(); clearTimout(avideoModalIframeWithClassNameTimeout);
}); avideoModalIframeRemove();
avideoModalIframeWithClassNameTimeout = setTimeout(function () { });
// is not loaded avideoModalIframeWithClassNameTimeout = setTimeout(function () {
url = addGetParam(url, 'avideoIframe', 0); // is not loaded
document.location = url; url = addGetParam(url, 'avideoIframe', 0);
}, 5000); document.location = url;
}, 5000);
}, 1000);
} }
function checkIframeLoaded(id) { function checkIframeLoaded(id) {