How To Autoplay a Video In Divi

The video module in Divi does not have the function to autoplay a video on page load. Fortunately, there are still some good ways to autoplay a video. In this tutorial, I will be covering 2 methods of how you can autoplay a video in Divi.

  • Autoplay a YouTube video in Divi
  • Autoplay an uploaded video on your server

Autoplay a YouTube Video In Divi

We can do this by embedding a YouTube video in the code module and then slightly alter the code. Start by going to youtube and copy the embed code of that video. To get the embed code right click on the video and then copy the embed code.

Copy the embed Youtube code

Place a code module on your page and paste the embed code in it.

Paste embed code in a Divi code module

To autoplay the video you need to add this behind the video URL.

?autoplay=1&mute=1

So it will look like this:

Alter the embed code to autoplay the video

This will autoplay the video however the video will be muted and the visitor has to enable the audio in the video window. Autoplay with audio will not work for all browsers. For example, it will not work for Chrome (you can learn more about this here). You can see this for yourself by making mute=1 to mute=0 in the code.

Autoplay An Uploaded Video On Your Server

Every module in Divi has the option to add a video background and you can use this to autoplay a video. I like to use the Divider module for this.

When you placed a Divider module go to the background video tab and upload your video.

Upload a background video in Divi

Then go to the design tab and scroll down to Sizing and use the following settings:

  • Divider height: 0px
  • Width: you can leave this blank or set a value
  • Height: for example 500px

You Might Also Like…

Leave a Comment

0 Shares
Share
Pin
Tweet