For development, you will only need Node.js installed on your environement. And please use the appropriate Editorconfig plugin for your Editor (not mandatory).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Stop an iframe or HTML5 <video> from playing | |
| * @param {Element} element The element that contains the video | |
| */ | |
| var stopVideo = function ( element ) { | |
| var iframe = element.querySelector( 'iframe'); | |
| var video = element.querySelector( 'video' ); | |
| if ( iframe ) { | |
| var iframeSrc = iframe.src; | |
| iframe.src = iframeSrc; |