Answers for "how to stop iframe video using javascript"

0

how to stop iframe video using javascript

var stopVideo = function ( element ) {
    var iframe = element.querySelector( 'iframe');
    var video = element.querySelector( 'video' );
    if ( iframe !== null ) {
        var iframeSrc = iframe.src;
        iframe.src = iframeSrc;
    }
    if ( video !== null ) {
        video.pause();
    }
};
Posted by: Guest on September-03-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language