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.
Place a code module on your page and paste the embed code in it.
To autoplay the video you need to add this behind the video URL.
So it will look like this:
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.
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…
- How To Speed Up Your Divi Website (Guide)
- How to Make a Divi Child Theme
- How to Make a Website With Divi Theme in 2023
- The Best Divi Plugins For 2023
- The Best Divi Child Themes For 2023
- The Best Divi WooCommerce Layouts For 2023
- How To Choose The Best Divi Hosting In 2023