logo
Search
showing results for - "how to stop iframe video using javascript"
Karl
01 Feb 2017
1var stopVideo = function ( element ) {
2    var iframe = element.querySelector( 'iframe');
3    var video = element.querySelector( 'video' );
4    if ( iframe !== null ) {
5        var iframeSrc = iframe.src;
6        iframe.src = iframeSrc;
7    }
8    if ( video !== null ) {
9        video.pause();
10    }
11};
12
source
similar questions
javascript prevent iframe interactionhow to detect if an video is over js htmljavascript restart videoiframe reload parentjavascript stop youtube videouse javascript to control iframe elementsstop a video jqueryplay iframe video onclick a link javascriptjs video controls falsejs reload iframe
queries leading to this page
iframe video stop with jquerystop video on page load iframehow to stop autoplay playing videos on iframepause iframe video javascriptstop autoplay embed video html iframeiframe video stopstop iframe video easy functionstop all iframe videos javascriptturn off auto play on iframe videostop autostart iframe videojavascript pause iframe videoyotube recommed video remove javascript iframeiframe video disable downloadprogrammatically iframe stop playing videostop iframe video jshow to disable iframe videohow to stop iframe video using javascript
privacy policyterms of useinstagram
Crafted with  ♥  for everyone

sign in to continue
your answer for
you will get a confirmation link on this - you will have to click that for successful submission of your answer. we require this to keep the website free of spam, bots and unhelpful content
please ensure to add code which is syntactically corrent and executes properly
sign in to continue
ask question on maxinterview
you will get a confirmation link on this - you will have to click that for successful submission of your question. we require this to keep the website free of spam, bots and unhelpful content
please be clear, to the point and respectful
sign in to continue