Prevent background row video to autoplay? Only start video after page is fully loaded?!

is it possible to prevent the background row videos to autoplay? Our approach is to speed up the page load by first showing the poster image and start playing the bg video only after the page is fully loaded.

I had a look into: \js\fl-builder-layout.js and see this initial creation of the video element: videoTag = $( '<video autoplay loop muted playsinline></video>' ); Is there any chance to remove the autoplay by JS in my theme? I suspect it’s not possible to prevent the autoplay after the bg video is initiated right now :frowning: ?!

My first try:

(function($){ $( window ).load( function(){ if ( $('.fl-bg-video').length > 0) { $('.fl-bg-video').each(function(i,el){ var player = $(el).find('video').get(0); player.pause(); }); } }); })(jQuery);
But this try is only a hacky and bad approach :frowning:

My second try would be to overwrite the /includes/row-video.php template by creating an own video element with the corresponding js code in my theme.

Is there a better way of realizing this?

my autoplayed videos started only in automodus, if there are on top in the content. It had to be a little frame of the video on the page without scolling. If you had first to sroll down to the video, they are still standing and only starting with refresh the site…

This topic was automatically closed after 18 hours. New replies are no longer allowed.