<?php
/**
 * Display template.
 *
 * @since	1.0.0
 */
global $post;
$display = new TVindoor_Display( get_the_id() );
$channel = new TVindoor_Channel( $display->get_active_channel() );

?><html>
	<head>
	<?php
		wp_head();
?>
	</head>
	<body <?php body_class(); ?>><?php
		?><div<?php $display->classes(); ?>><?php

			$post = get_post( $channel->ID );
			setup_postdata( $post );

			TVindoor_Templates::get_template('partials/channel.php');

			wp_reset_postdata();
		?></div><?php

		wp_footer();
	
		
	?></body>
	
	<?php 
	$radioset = get_field('show_radio', $channel->ID );
	$urlradioset = get_field('streaming_url', $channel->ID );
		
?>
		
</html>
<?php   if ( true === $radioset ) {
        //echo 'aqui: '.$channel->ID;
	    echo espectro_play($channel->ID) ;
	    ?>
 <script type="text/javascript" src="<?php echo TVINDOOR_PLUGIN_URL.'public/js/lunaradio.min.js?ver=5.7.2'; ?> id='lunaradio-js"></script>
    
<script type="text/javascript" src="<?php echo TVINDOOR_PLUGIN_URL.'public/js/initlunaradio.js?ver=5.7.2'; ?> id='initlunaradio-js"></script>
    
<?php   
	}
?>	