mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-05 02:39:46 +02:00
fix iframe
This commit is contained in:
parent
5e81d64ffd
commit
301783ec50
1 changed files with 10 additions and 6 deletions
|
@ -1357,6 +1357,9 @@ function avideoModalIframeWithClassName(url, className, updateURL) {
|
|||
try {
|
||||
$('#avideoModalIframe').load(function () {
|
||||
contentLoaded = true;
|
||||
console.log('avideoModalIframeWithClassName content loaded 1');
|
||||
clearTimout(avideoModalIframeWithClassNameTimeout);
|
||||
avideoModalIframeRemove();
|
||||
});
|
||||
} catch (e) {
|
||||
}
|
||||
|
@ -1364,16 +1367,17 @@ function avideoModalIframeWithClassName(url, className, updateURL) {
|
|||
if($('#avideoModalIframe').contents().find("body").length){
|
||||
contentLoaded = true;
|
||||
}
|
||||
avideoModalIframeWithClassNameTimeout = setTimeout(function () {
|
||||
// is not loaded
|
||||
url = addGetParam(url, 'avideoIframe', 0);
|
||||
document.location = url;
|
||||
}, 5000);
|
||||
|
||||
if(contentLoaded){
|
||||
console.log('avideoModalIframeWithClassName content loaded');
|
||||
console.log('avideoModalIframeWithClassName content loaded 2');
|
||||
clearTimout(avideoModalIframeWithClassNameTimeout);
|
||||
avideoModalIframeRemove();
|
||||
}else{
|
||||
avideoModalIframeWithClassNameTimeout = setTimeout(function () {
|
||||
// is not loaded
|
||||
url = addGetParam(url, 'avideoIframe', 0);
|
||||
document.location = url;
|
||||
}, 5000);
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue