add option to mute background videos (updated)
This commit is contained in:
parent
6949ebc762
commit
b49664621f
2 changed files with 7 additions and 2 deletions
|
@ -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 +'">';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue