When the page load this iframe class=\"frame_src\"
must be hidden like, display=\"none\"
And after 10 seconds this div must hide class=\"
OK, you have to clear the content of the iframe
as well as it's src
.
You can use about:blank
for it's src
as it loads a bland page in the iframe
so if you add
document.querySelector(".frame_src").src = "about:blank";
to the beginning of the startschedule()
function, it will do the trick for you.
your function should look like this after the change:
function startschedule() {
document.querySelector(".frame_src").src = "about:blank";
clearInterval(interval), secondsleft = threshold, document.querySelector(".load_video").innerHTML = "Please Wait.. " + Math.abs(secondsleft / 1e3) + " Seconds", interval = setInterval(function() {
startChecking()
}, 1e3)
}