mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-06 03:50:04 +02:00
Fix iframe load
This commit is contained in:
parent
85e59b9f86
commit
18a10d42d2
1 changed files with 9 additions and 9 deletions
|
@ -1317,6 +1317,7 @@ function avideoModalIframeFull(url) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var avideoModalIframeFullScreenOriginalURL = false;
|
var avideoModalIframeFullScreenOriginalURL = false;
|
||||||
|
var avideoModalIframeWithClassNameTimeout;
|
||||||
function avideoModalIframeWithClassName(url, className, updateURL) {
|
function avideoModalIframeWithClassName(url, className, updateURL) {
|
||||||
showURL = document.location.href;
|
showURL = document.location.href;
|
||||||
if (updateURL) {
|
if (updateURL) {
|
||||||
|
@ -1351,15 +1352,14 @@ function avideoModalIframeWithClassName(url, className, updateURL) {
|
||||||
avideoModalIframeFullScreenOriginalURL = false;
|
avideoModalIframeFullScreenOriginalURL = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
setTimeout(function () {
|
$('#avideoModalIframeDiv iframe').load(function(){
|
||||||
if ($('#avideoModalIframeDiv iframe').contents().find('body').children().length > 0) {
|
clearTimout(avideoModalIframeWithClassNameTimeout);
|
||||||
// is loaded
|
avideoModalIframeRemove();
|
||||||
avideoModalIframeRemove();
|
});
|
||||||
} else {
|
avideoModalIframeWithClassNameTimeout = setTimeout(function () {
|
||||||
// is not loaded
|
// is not loaded
|
||||||
url = addGetParam(url, 'avideoIframe', 0);
|
url = addGetParam(url, 'avideoIframe', 0);
|
||||||
document.location = url;
|
document.location = url;
|
||||||
}
|
|
||||||
}, 5000);
|
}, 5000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue