Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
WordPress :: Divi Builder :: Background Videos :: Mute a video's audio.
<script>
(function($) {
$(document).ready(function() {
var $videos = $('.et_pb_section_video_bg video');
$videos.each(function() {
var $video = $(this)[0];
$video.setMuted();
});
});
})(jQuery);
</script>
@rednoisemedia

This comment has been minimized.

Copy link

commented Nov 18, 2016

where would I add this script please?

@cdogden

This comment has been minimized.

Copy link

commented Feb 11, 2017

Anybody get this to work?

@daibangcanhcut

This comment has been minimized.

Copy link

commented Feb 6, 2018

Adding script to Theme Option -> Integration -> Add code to the < head > of your blog

This works for me (https://stackoverflow.com/questions/42764981/divi-builder-background-video-to-be-muted/45194700#45194700)

<script type="text/javascript">
 jQuery(document).ready(function(){
   jQuery(".et_pb_section_video_bg video").prop('muted', true); 
});
</script>
@RingahDing

This comment has been minimized.

Copy link

commented Feb 17, 2018

Script works for me as well

<script type="text/javascript"> jQuery(document).ready(function(){ jQuery(".et_pb_section_video_bg video").prop('muted', true); }); </script>
@aiokaizen

This comment has been minimized.

Copy link

commented Mar 3, 2018

This worked for me too, thank you bro.

<script type="text/javascript"> jQuery(document).ready(function(){ jQuery(".et_pb_section_video_bg video").prop('muted', true); }); </script>
@TinyUnicornTeeth

This comment has been minimized.

Copy link

commented May 11, 2018

This worked for me, thank you so much!

<script type="text/javascript"> jQuery(document).ready(function(){ jQuery(".et_pb_section_video_bg video").prop('muted', true); }); </script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.