<?php
/**
 * The template to display the background video in the header
 *
 * @package TOURIMO
 * @since TOURIMO 1.0.14
 */
$tourimo_header_video = tourimo_get_header_video();
$tourimo_embed_video  = '';
if ( ! empty( $tourimo_header_video ) && ! tourimo_is_from_uploads( $tourimo_header_video ) ) {
	if ( tourimo_is_youtube_url( $tourimo_header_video ) && preg_match( '/[=\/]([^=\/]*)$/', $tourimo_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 tourimo_show_layout( tourimo_get_embed_video( $tourimo_header_video ) ); ?></div>
		<?php
	}
}
