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.