[Smush Pro] Lazy Load causes autoplay video to fail

Hello, I’m writing to you because we recently experienced a video background that simply… ceased to work. Quietly. The video would play in the Oxygen Builder’s editor, but on the frontend the video would simply not play.

Today I was tasked with figuring out why, and ultimately what we came across was that disabling “Lazy load” reenabled the autoplaying video.

Underway, I tried the following jquery, and many variations thereof (mostly a stream of console.logs):

jQuery(window).load(function() {
let videos = jQuery("video[autoplay]")
videos.each(function(index) {
let video = videos.get(index)
video.muted = true
video.autoplay = true
video.preload = 'none'
let promise = video.play()
promise
.then( () => {} )
.catch( () => { console.log("Could not play video.") } )
})
})

This would return a promise, which would remain pending forever.

This is less of a technical support request, and more of a bug submission; there are no options to disable lazyload for videos, and it almost certainly shouldn’t behave this way on autoplaying videos.

  • Bhakti Rajdev Display Name
    • Staff

    Hello Sydvest ,

    I hope you are doing good today!

    I checked the lazyload feature for videos with autoplay on with Oxygen Builder and the latest version of Smush Pro – 3.5.1 on my test site and it worked well.

    I can see that the Smush Pro version you are using is the older version – 3.5.0. I will suggest to update it to the latest version and re-check if it solves the issue. The latest version released had a bug fix for the lazy loading feature for videos. Attaching screenshot from the latest update:

    [attachments are only viewable by logged-in members]

    Do let us know if that solves your issue.

    Looking forward to hearing from you.

    Thank You,
    Bhakti Rajdev