1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-06 03:50:04 +02:00

fix iframe

This commit is contained in:
Daniel 2022-02-22 21:44:26 -03:00
parent 5e81d64ffd
commit 301783ec50

View file

@ -1357,6 +1357,9 @@ function avideoModalIframeWithClassName(url, className, updateURL) {
try { try {
$('#avideoModalIframe').load(function () { $('#avideoModalIframe').load(function () {
contentLoaded = true; contentLoaded = true;
console.log('avideoModalIframeWithClassName content loaded 1');
clearTimout(avideoModalIframeWithClassNameTimeout);
avideoModalIframeRemove();
}); });
} catch (e) { } catch (e) {
} }
@ -1364,16 +1367,17 @@ function avideoModalIframeWithClassName(url, className, updateURL) {
if($('#avideoModalIframe').contents().find("body").length){ if($('#avideoModalIframe').contents().find("body").length){
contentLoaded = true; contentLoaded = true;
} }
avideoModalIframeWithClassNameTimeout = setTimeout(function () {
// is not loaded
url = addGetParam(url, 'avideoIframe', 0);
document.location = url;
}, 5000);
if(contentLoaded){ if(contentLoaded){
console.log('avideoModalIframeWithClassName content loaded'); console.log('avideoModalIframeWithClassName content loaded 2');
clearTimout(avideoModalIframeWithClassNameTimeout); clearTimout(avideoModalIframeWithClassNameTimeout);
avideoModalIframeRemove(); avideoModalIframeRemove();
}else{
avideoModalIframeWithClassNameTimeout = setTimeout(function () {
// is not loaded
url = addGetParam(url, 'avideoIframe', 0);
document.location = url;
}, 5000);
} }
}, 1000); }, 1000);
} }