diff options
author | Razvan Caliman <razvan.caliman@gmail.com> | 2015-12-03 09:43:32 +0000 |
---|---|---|
committer | Razvan Caliman <razvan.caliman@gmail.com> | 2015-12-03 09:43:32 +0000 |
commit | b49664621f2a4ecb683a952e4dee86be2258453f (patch) | |
tree | dc5076986726cb3842723dca025862b529410597 /js/reveal.js | |
parent | 6949ebc762ca993b3f8b34b46dead40a15b30e82 (diff) | |
download | fosdem-2018-presentation-b49664621f2a4ecb683a952e4dee86be2258453f.tar fosdem-2018-presentation-b49664621f2a4ecb683a952e4dee86be2258453f.tar.gz |
add option to mute background videos (updated)
Diffstat (limited to 'js/reveal.js')
-rw-r--r-- | js/reveal.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/js/reveal.js b/js/reveal.js index da1a60a..e25337e 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2873,6 +2873,7 @@ var backgroundImage = slide.getAttribute( 'data-background-image' ), backgroundVideo = slide.getAttribute( 'data-background-video' ), backgroundVideoLoop = slide.hasAttribute( 'data-background-video-loop' ), + backgroundVideoMuted = slide.hasAttribute( 'data-background-video-muted' ), backgroundIframe = slide.getAttribute( 'data-background-iframe' ); // Images @@ -2887,6 +2888,10 @@ video.setAttribute( 'loop', '' ); } + if( backgroundVideoMuted ) { + video.muted = true; + } + // Support comma separated lists of video sources backgroundVideo.split( ',' ).forEach( function( source ) { video.innerHTML += '<source src="'+ source +'">'; |