<!DOCTYPE html>
<html lang="{{ app()->getLocale() }}">
<head>
<title>NH Gooi | {{$title}} </title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="{{ url( '/css/bootstrap.min.css' )}}">
<link rel="stylesheet" type="text/css" href="{{ url( '/css/font-awesome.min.css' )}}">
<link rel="stylesheet" type="text/css" href="{{ url( '/css/animate.css' )}}">
<link rel="stylesheet" type="text/css" href="{{ url( '/css/font.css' )}}">
<link rel="stylesheet" type="text/css" href="{{ url( '/css/li-scroller.css' )}}">
<link rel="stylesheet" type="text/css" href="{{ url( '/css/slick.css' )}}">
<link rel="stylesheet" type="text/css" href="{{ url( '/css/jquery.fancybox.css' )}}">
<link rel="stylesheet" type="text/css" href="{{ url( '/css/theme.css' )}}">
<link rel="stylesheet" type="text/css" href="{{ url( '/css/style.css' )}}">
<link rel="stylesheet" type="text/css" href="{{ url( '/css/custom.css' )}}">
<script type="text/javascript" src="{{ url( 'js/jquery.min.js' )}}"></script>
<!--[if lt IE 9]>
<script src="{{ url( '/js/html5shiv.min.js' )}}"></script>
<script src="{{ url( '/js/respond.min.js' )}}"></script>
<![endif]-->
</head>
<body>

   <p class='text-right'>
   <a href="javascript:window.close();" class="btn btn-link"><span class='fa fa-close fa-fw'></span> Venster sluiten</a>
   </p>

   <p class="logo"><a href="{{ url('/') }}"><img src="{{ url( 'images/logo.png' )}}"></a></p>

   <p>
     <b>Nu op NH Gooi:</b>
     <span id="nowonair"></span>
     <script type="text/javascript">
       setInterval(function() { 
         $.ajax({ 
           'url': '{{url('onair')}}',
           'success': updateNowPlaying
          }); 
       }, 5000);

       updateNowPlaying({!!file_get_contents(url('onair'))!!});
       function updateNowPlaying(data) {
         $("#nowonair").text(data.program.name);
       }
     </script>
     @if(!$isStream) <br />
       <a href="{{ url( 'luister/live' ) }}" class="btn-link"><span class='fa fa-fw fa-play'></span> Luister live</a> 
     @endif
   </p>

@if(false && $isStream)
   <p>Wegens een technisch probleem is NH Gooi momenteel niet via Internet te beluisteren. Onze excuses voor het ongemak.</p>
   <p>In Hilversum, Huizen en de BEL-gemeenten zijn wij te ontvangen op 92.0 FM of 105.1 FM.</p>
@else
   <p><b>U luistert nu naar</b> {!!$content!!}</p>
   @if(isset($tabs))
   <p>
     @foreach($tabs as $link => $caption)
     <a href="{{$link}}" class="btn btn-{{$link == '#' ? 'primary' : 'default'}}">{{$caption}}</a>
     @endforeach
   </p>
   @endif
   <p>
   <audio controls @if($isStream) autoplay="true" @endif >
     <source src="{{$source}}" type="audio/mp3" />
   </audio>
   </p>

   <p>
   @if(!$isStream && $canDownload) 
      <a href="{{$source}}" class="btn btn-primary">Download als MP3</a> 
   @endif
   </p>
@endif

  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/mediaelement/4.2.3/mediaelementplayer.css" />
  <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mediaelement/4.2.3/mediaelement-and-player.min.js"></script>
   <script type="text/javascript">
      $("video, audio").mediaelementplayer({
         pluginPath: 'https://cdnjs.cloudflare.com/ajax/libs/mediaelement/4.2.3/',
         stretching: 'responsive'
      });
  </script>
</body>
</html>

