<?php
/**
 * The template to display the background video in the header
 *
 * @package LAW OFFICE
 * @since LAW OFFICE 1.0.14
 */
$law_office_header_video = law_office_get_header_video();
$law_office_embed_video  = '';
if ( ! empty( $law_office_header_video ) && ! law_office_is_from_uploads( $law_office_header_video ) ) {
	if ( law_office_is_youtube_url( $law_office_header_video ) && preg_match( '/[=\/]([^=\/]*)$/', $law_office_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 law_office_show_layout( law_office_get_embed_video( $law_office_header_video ) ); ?></div>
		<?php
	}
}
