<?php
/**
 * The template to display the background video in the header
 *
 * @package HYGIA
 * @since HYGIA 1.0.14
 */
$hygia_header_video = hygia_get_header_video();
$hygia_embed_video  = '';
if ( ! empty( $hygia_header_video ) && ! hygia_is_from_uploads( $hygia_header_video ) ) {
	if ( hygia_is_youtube_url( $hygia_header_video ) && preg_match( '/[=\/]([^=\/]*)$/', $hygia_header_video, $matches ) && ! empty( $matches[1] ) ) {
		?><div id="background_video" data-youtube-code="<?php echo esc_attr( $matches[1] ); ?>"></div>
		<?php
	} else {
		?>
		<div id="background_video"><?php hygia_show_layout( hygia_get_embed_video( $hygia_header_video ) ); ?></div>
		<?php
	}
}
