Hide video & make a clickable play button icon on header

You can do by that way. <div id=”thevideo” style=”display:none; padding: 0px;”> <center> <video onclick=”this.play();” preload=”auto” width=”600″ height=”370″> <source src=”http://edigi.co/Impatto_Branding_Agency-Large.mp4″ type=”video/mp4″/> </video> </center> </div> <script> $(document).ready(function() { $(‘.custom-th’).click(function() { $(‘.custom-th’).fadeOut(‘fast’, function() { $(“#thevideo”).css(“display”,”block”); $(“video”).click(); }); }); }); </script>

Where is the Javascript attribute window._wpCustomHeaderSettings defined?

It’s defined via wp_localize_script() that’s called by the_custom_header_markup(): wp_localize_script( ‘wp-custom-header’, ‘_wpCustomHeaderSettings’, get_header_video_settings() ); So if you want to override the values/settings using JavaScript, then you can hook to wp_print_footer_scripts and add your script like so: add_action( ‘wp_print_footer_scripts’, function(){ if ( wp_script_is( ‘wp-custom-header’ ) ) : ?> <script> if ( window._wpCustomHeaderSettings ) { _wpCustomHeaderSettings.minHeight = 0; … Read more

Video to stretch across the entire homepage [closed]

You could add negative margins to the video element. If inline (adjust as needed): <video id=”video_688987199_html5_api” class=”vjs-tech” preload=”auto” autoplay=”” data-setup=”{}” src=”https://wordpress.stackexchange.com/wp-content/uploads/2018/04/video.mp4″ poster=”null” style=”margin-left: -50px; margin-right: -50px;”> If in stylesheet (again… adjust as needed): .vjs-tech { margin-left: -50px; margin-right: -50px; } Another option is to set the width as something greater than the parent div’s width. … Read more

How can I use a video header that’s over 8MB?

The limit is enforced by _validate_header_video method, registered as validation callback on respective Customizer setting. There is a filter that allows you to hook into the process and manipulate those arguments: add_filter( ‘customize_dynamic_setting_args’, function ( $args, $id ) { if ( ‘header_video’ === $id ) { // change $args[‘validate_callback’] } return $args; }, 10, 2 … Read more