Important:
This support area is for Kalium 3 users only.
Support for Kalium 4 has moved to our new platform at support.laborator.co.
If you’re using Kalium 4, please create a new account there using your email and license key. A password will be sent to you automatically.
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):
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' );