<?php
/**
 * The template to display the background video in the header
 *
 * @package PATHFINDER
 * @since PATHFINDER 1.0.14
 */
$pathfinder_header_video = pathfinder_get_header_video();
$pathfinder_embed_video  = '';
if ( ! empty( $pathfinder_header_video ) && ! pathfinder_is_from_uploads( $pathfinder_header_video ) ) {
	if ( pathfinder_is_youtube_url( $pathfinder_header_video ) && preg_match( '/[=\/]([^=\/]*)$/', $pathfinder_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 pathfinder_show_layout( pathfinder_get_embed_video( $pathfinder_header_video ) ); ?></div>
		<?php
	}
}
