How to make Youtube Video Autoplay on my website - Forum | JoomShaper
Staff replied SP Page Builder

How to make Youtube Video Autoplay on my website

Asked by CIV MISSIONS AFRICAINES 5 years ago Last activity 5 years ago

Hello all,

Please I would like to make my video automatically play when I open my website. I know the option is the for MP4 Video but how do I do that for youtube videos?

Thank you.

1 reply

Ofi Khan Staff

Hello CIV MISSIONS AFRICAINES

You need to add Custom JavaScript to your site. Find your video source from inspecting the addon and then add &autoplay=1 to it. I have used a sample YouTube video source link in the code.


jQuery(function($) {
  $('.sppb-embed-responsive-item').attr('src','//www.youtube.com/embed/BWLRMBrKH_c?iv_load_policy=3&rel=1&autoplay=1');  
});

Best regards
Log in to reply.