Autoplay jQuery not working with this
-
Hi, I have the following jq code in my
Divi Options>Integration>Add code to the < head > of your blog
but it doesn’t seem to work with the popup video section in Divi? Is there a way to autoplay (mute) the video? I know sound is a problem. I have removed the overlay from the video module in case that told it not to but no improvement:
code is:
<script>
jQuery(document).ready(function() {
if (jQuery(‘.mre-video-autoplay .et_pb_video_box’).length !== 0) {jQuery(‘.mre-video-autoplay .et_pb_video_box’).find(‘video’).prop(‘muted’, true);
jQuery(“.mre-video-autoplay .et_pb_video_box”).find(‘video’).attr(‘playsInline’, ”);
jQuery(“.mre-video-autoplay .et_pb_video_box”).find(‘video’).attr(‘loop’, ‘loop’);jQuery(“.mre-video-autoplay .et_pb_video_box”).each(function() {
jQuery(this).find(‘video’).get(0).play();
});jQuery(‘.mre-video-autoplay .et_pb_video_box’).find(‘video’).removeAttr(‘controls’);
}
});
</script>and the mre-video-autoplay css style is added in the CSS Class of the video module.
Thanks
The page I need help with: [log in to see the link]
- The topic ‘Autoplay jQuery not working with this’ is closed to new replies.