Comments Dirma started the conversationJanuary 15, 2019 at 1:48pmDear Kalium Theme, The video (youtube) on the homepage of http://ahaa.nl/ won't autoplay. In 'Video and audio settings' I enabled 'auto play videos', but it doesn't autoplay everytime (sometimes it does). I hope you can help me with this problem! Kind regards, Dirma[deleted] repliedJanuary 16, 2019 at 8:12amHi Dirma,Normally, browsers won't autoplay videos if they are not muted, read more here:https://developers.google.com/web/updates/2017/09/autoplay-policy-changesI am giving you a code that will mute the video and this will increase the probability for video to be auto-played.So please add the following code in functions.php (end of file): function kalium_embed_video_atts_youtube_mute( $atts ) { if ( isset( $atts['data-vsetup']['youtube'] ) ) { $atts['data-vsetup']['youtube']['customVars']['mute'] = 1; } return $atts;}add_filter( 'kalium_embed_video_atts', 'kalium_embed_video_atts_youtube_mute' ); Sign in to reply ...
Dear Kalium Theme,
The video (youtube) on the homepage of http://ahaa.nl/ won't autoplay. In 'Video and audio settings' I enabled 'auto play videos', but it doesn't autoplay everytime (sometimes it does).
I hope you can help me with this problem!
Kind regards,
Dirma
Hi Dirma,
Normally, browsers won't autoplay videos if they are not muted, read more here:
https://developers.google.com/web/updates/2017/09/autoplay-policy-changes
I am giving you a code that will mute the video and this will increase the probability for video to be auto-played.
So please add the following code in functions.php (end of file):