From 00fa1c818dc5806297c3ab3ec68abc13911774d1 Mon Sep 17 00:00:00 2001 From: Greg Denehy Date: Thu, 19 Feb 2015 17:04:41 +1030 Subject: Added option to loop background videos --- js/reveal.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'js/reveal.js') diff --git a/js/reveal.js b/js/reveal.js index 65ac29f..5a3f1af 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2590,6 +2590,7 @@ var backgroundImage = slide.getAttribute( 'data-background-image' ), backgroundVideo = slide.getAttribute( 'data-background-video' ), + backgroundVideoLoop = slide.hasAttribute( 'data-background-video-loop' ), backgroundIframe = slide.getAttribute( 'data-background-iframe' ); // Images @@ -2599,6 +2600,9 @@ // Videos else if ( backgroundVideo && !isSpeakerNotes() ) { var video = document.createElement( 'video' ); + if ( backgroundVideoLoop ) { + video.setAttribute( 'loop', '' ); + } // Support comma separated lists of video sources backgroundVideo.split( ',' ).forEach( function( source ) { -- cgit v1.2.3