mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +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 avideoModalIframeWithClassNameTimeout;
|
||||
function avideoModalIframeWithClassName(url, className, updateURL) {
|
||||
showURL = document.location.href;
|
||||
if (updateURL) {
|
||||
|
@ -1351,15 +1352,14 @@ function avideoModalIframeWithClassName(url, className, updateURL) {
|
|||
avideoModalIframeFullScreenOriginalURL = false;
|
||||
}
|
||||
});
|
||||
setTimeout(function () {
|
||||
if ($('#avideoModalIframeDiv iframe').contents().find('body').children().length > 0) {
|
||||
// is loaded
|
||||
avideoModalIframeRemove();
|
||||
} else {
|
||||
// is not loaded
|
||||
url = addGetParam(url, 'avideoIframe', 0);
|
||||
document.location = url;
|
||||
}
|
||||
$('#avideoModalIframeDiv iframe').load(function(){
|
||||
clearTimout(avideoModalIframeWithClassNameTimeout);
|
||||
avideoModalIframeRemove();
|
||||
});
|
||||
avideoModalIframeWithClassNameTimeout = setTimeout(function () {
|
||||
// is not loaded
|
||||
url = addGetParam(url, 'avideoIframe', 0);
|
||||
document.location = url;
|
||||
}, 5000);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue