Video Header not always autoplaying
-
Hi, I’m having trouble with my video background sometimes not autoplaying. I linked a youtube video in the video header section of “customize”
I followed this tutorial and the video does display, just doesn’t always autoplay.
https://howto-wordpress-tips.com/video-header-wordpress-tutorial/If I refresh it enough it does autoplay and continues to autoplay each time until I clear the cache (I believe anyway).
This is in my functions.php (as a note I added autoplay and mute from a support forum question I found but it didn’t help).
add_theme_support( ‘custom-header’, array(
‘video’ => true
));add_filter( ‘header_video_settings’, ‘header_video_resolution’);
function header_video_resolution( $settings ) {
$settings[‘minWidth’] = 0;
$settings[‘minHeight’] = 100;
$settings[‘autoplay’] = 1;
$settings[‘mute’]= 1;
return $settings;My header.php – I added this right after <head> I’ve also tried it in other spots including right before <header class=
<?php the_custom_header_markup() ?>As a note I’m using the basic child theme of the free version of Hestia
Thank you so much!!
The page I need help with: [log in to see the link]
- The topic ‘Video Header not always autoplaying’ is closed to new replies.