How to Autoplay a Video in a Divi Website

by | Last updated Oct 28, 2024 | Divi Tutorials

How to Autoplay a Video in a Divi

The Divi video module lacks the function to autoplay a video on page load. A user, therefore, has to click on the video so it can start to play. In this tutorial, I’ll be showing you how you can autoplay a video in Divi without using a plugin.

You can choose to follow this video tutorial, or go through the entire post.

How to Autoplay a YouTube Video in Divi

To be able to autoplay a YouTube video on page load in Divi, you will need to use a Divi Code Module instead of the Divi Video Module.

We’ll embed a YouTube video in the code module by slightly altering the code. First, go to YouTube and grab the embed code of the video you want to use.

To get the embed code, right-click on the video and then copy the embed code.

divi video autoplay - embed code

Next, add the code module on your page and paste the embed code in it.

embeded code

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

?autoplay=1&mute=1

It will look like this:

altered code

This functionality will autoplay the video.

However, the video will be muted and the website visitor has to enable the audio in the video window.

Autoplay with audio will not work for some browsers. For example, it may not work for Chrome. You can test this by making mute=1 to mute=0 in the code.

How to Autoplay An Uploaded Video On Your Server

To enable autoplay on an uploaded video, we’ll use the video as a background on any Divi module. The best module to use is the Divider module.

Here is how to do it:

Add the Divider module to where you would want to add the video.

Disable the divider visibility.

disabled visibilty of the divider

On the Divider module, go to the background video tab and upload your video.

Add background video

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

Width: leave it blank

Height: 600px

And, that’s how to autoplay a video in Divi website.

Shop Divi Products

Buy nicely done Divi Layouts, Child themes, and extensions for your next Divi project.

Related Articles

How to Add Padding Around Featured Images in Divi’s Blog Module

How to Add Padding Around Featured Images in Divi’s Blog Module

If you're using the Divi theme for your WordPress website and want to customize the appearance of your blog posts page, one simple tweak you can make is adding padding around the featured images. This can help create a more visually appealing layout and better...

Divi Logo Guide: Everything You Need to Know

Divi Logo Guide: Everything You Need to Know

A professionally designed logo is a powerful branding asset that can leave a lasting impression on your website visitors. Research shows that a well-designed logo can boost consumer trust in a brand by an impressive 75%. But the question most people ask is – how do...

Leave a Comment

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

WP101 - FREE WordPress Tutorials

Enter your email address below to gain access to the FREE WordPress training.

You have Successfully Subscribed!

Pin It on Pinterest