Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

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();
    }
};
Comment

PREVIOUS NEXT
Code Example
Javascript :: generate unique id javascript 
Javascript :: How to save input from box html 
Javascript :: regex for 4 digit number javascript 
Javascript :: iife arrow function 
Javascript :: how to simulate a keypress in javascript 
Javascript :: javascript set localstorage 
Javascript :: change name of html element javascript 
Javascript :: How to create $(document).ready() for vanilla JavaScript 
Javascript :: javascript object total 
Javascript :: slug generator javascript 
Javascript :: javascript iterate object 
Javascript :: javascript redirect function 
Javascript :: javascript redirect another page 
Javascript :: change form action js 
Javascript :: javascript get x,y point on circle 
Javascript :: jquery get data attribute of selected option 
Javascript :: reactjs router link props 
Javascript :: javascript clear classlist 
Javascript :: center an element react native 
Javascript :: select random from an array 
Javascript :: onclick event in angular 
Javascript :: json schema string or null 
Javascript :: number format in javascript 
Javascript :: VM724:1 Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0 
Javascript :: round number 2 decimal places javascript 
Javascript :: append sibling javascript after first child 
Javascript :: Found multiple occurrences of org.json.JSONObject on the class path: 
Javascript :: how to get current date in js 
Javascript :: javascript un hiden element 
Javascript :: sort array by date 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =