How To Make Youtube Video Autoplay On My Website - Question | JoomShaper

How To Make Youtube Video Autoplay On My Website

CA

CIV MISSIONS AFRICAINES

SP Page Builder 3 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.

0
1 Answers
Ofi Khan
Ofi Khan
Accepted Answer
Support Agent 3 years ago #3308

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
0