• 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]

Viewing 1 replies (of 1 total)
  • Thread Starter ziposaurus

    (@ziposaurus)

    Oh, OK – it seems that it wont work in a pop up or on a button activated ‘show video’ panel – the video will autoplay when it is simply present as a regular module already shown on the page! thanks

Viewing 1 replies (of 1 total)
  • The topic ‘Autoplay jQuery not working with this’ is closed to new replies.