Using Divi Theme - How to Disable video player preloading

I'm using Divi and I'm self hosting my videos. They are all small (under 5 MB) videos and about 10-30 seconds in length.

I want to create a page with a bunch of videos

But I want to stop the videos from preloading and only load when someone clicks play. This is the code I was giving and told to put in the theme options - integration - head

(function($) {
$(document).ready(function() {

But this does not solve my problem. I did look at the source code and the code it loading properly on the page, but it's not stopping the preloading.

  • Adam Czajczyk
    • Support Gorilla

    Hello Justin Alan,

    I hope you're well today and thank you for your question!

    I have visited your site but there's no content on /reviewes-2 page. I then checked the /reviewes page and I can see four videos there but a look at the browser console and the sources loaded suggests that they are not pre-loaded. The player is loaded and then "tweaked" (most likely by some JS code) to show only video thumbnail with a "play" button overlay but the video content is not upon page load. It seems like the video file content is fetched only after the "play" button is pushed so that would confirm that there's no pre-loading.

    Is this what you wished to achieve or am I missing the point? If I misunderstood you, correct me please and I'll be happy to assist you.

    Best regards,

  • Justin Alan
    • Flash Drive

    Thanks for taking the time to look into this. By adding a thumbnail image in Divi, out solved my problem. I figured it out a different by accident, so thanks for the help.

    But do you know any code I could add to stop preloading video with Divi? If not that's OK too.


  • Dimitris
    • Support Star

    Hey there Justin Alan,

    hope you're doing good and don't mind chiming in here! :slight_smile:

    I'm glad you've been able to sort that out. Inspecting this page the only I can spot is only this "preload" attribute so a script like the one you've mentioned should do the trick. If not, you can try to use a little timeout, like

    (function($) {
    }, 50);
    })( jQuery );

    If that doesn't make the trick, then this script should be binded to the video object creation, so it may be better to advise Divi devs about it.

    Hope that was some help, let us know if further assistance is required here!
    Take care,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.