Merge pull request #1138 from denehyg/background-video-loop

background video loop
This commit is contained in:
Hakim El Hattab
2015-02-25 15:48:48 +01:00
2 changed files with 6 additions and 2 deletions

View File

@ -2756,6 +2756,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
@ -2765,6 +2766,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 ) {