website/reveal/js/reveal.js
/**
	 * Stop playback of any embedded content inside of
	 * the targeted slide.
	 */
Stop playback of any embedded content inside of
the targeted slide.
Stop playback of any embedded content inside of the targeted slide .
function stopEmbeddedContent( slide ) {
		if( slide ) {
			toArray( slide.querySelectorAll( 'video, audio' ) ).forEach( function( el ) {
				if( !el.hasAttribute( 'data-ignore' ) ) {
					el.pause();
				}
			} );
			toArray( slide.querySelectorAll( 'iframe' ) ).forEach( function( el ) {
				el.contentWindow.postMessage( 'slide:stop', '*' );
			});
			toArray( slide.querySelectorAll( 'iframe[src*="youtube.com/embed/"]' ) ).forEach( function( el ) {
				if( !el.hasAttribute( 'data-ignore' ) && typeof el.contentWindow.postMessage === 'function' ) {
					el.contentWindow.postMessage( '{"event":"command","func":"pauseVideo","args":""}', '*' );
				}
			});
		}
	}
function stopEmbeddedContent ( slide ) { if ( slide ) { toArray ( slide . querySelectorAll ( 'video, audio' ) ) . forEach ( function ( el ) { if ( ! el . hasAttribute ( 'data-ignore' ) ) { el . pause ( ) ; } } ) ; toArray ( slide . querySelectorAll ( 'iframe' ) ) . forEach ( function ( el ) { el . contentWindow . postMessage ( 'slide:stop' , '*' ) ; } ) ; toArray ( slide . querySelectorAll ( 'iframe[src*="youtube.com/embed/"]' ) ) . forEach ( function ( el ) { if ( ! el . hasAttribute ( 'data-ignore' ) && typeof el . contentWindow . postMessage === 'function' ) { el . contentWindow . postMessage ( '{"event":"command","func":"pauseVideo","args":""}' , '*' ) ; } } ) ; } }
Stop playback of any embedded content inside of
 the targeted slide.
Stop playback of any embedded content inside of the targeted slide .
// HTML5 media elements // iframe embeds // YouTube embeds