player.html 5.01 KB
Newer Older
1

2
3
<div id="player-container" class="normal cf">
	<div id="player" class="wrapper cf">
4
		<div id="audioPlayer" class="cf">
Simon Daron's avatar
Simon Daron committed
5
			<div class="padded cf">
Simon Daron's avatar
Simon Daron committed
6
				<ul class="metas custom right big">
7
					<li><a class="button resymbol icon-download inBlock" title="Get the stream on your player!" href="http://streaming.domainepublic.net:8000/radiopanik.ogg.m3u"></a></li>
8
					<!--<li><button class="icon-eye-open " title="Show/Hidden HTML5 audio player" onclick="$('#DirectStreamPanik').toggleClass('hidden');$(this).toggleClass('icon-eye-open icon-eye-close');return false;"></button></li>-->
9
10
					<li><button title="Need some help?" onclick="$('#PlayerHelp').toggle();" class="icon-question-sign"></button></li>
				</ul>
Simon Daron's avatar
Simon Daron committed
11
12
13
14
				<span class="button block" id="DirectStreamPanikControler">
					<div id="streamSymbol" class="icon-volume-up resymbol"></div>
					<div class="label">en direct</div>
				</span>
15
16
17
18
19
20
21
22
23
24
25
26
				<div id="CurrentlyPlaying" class="ellipsis">
					<button class="icon-refresh" id="RefreshWhatsOnAir"></button>
					<span id="WhatsOnAir"></span>
				</div>
				<audio 
					id="DirectStreamPanik" 
					preload="none" 
					class="hidden" 
					tabindex="0" 
					src="http://streaming.domainepublic.net:8000/radiopanik.ogg?&unique={{ uuid }}"
					controls="controls"
					></audio> 
Simon Daron's avatar
Simon Daron committed
27
				<div id="PlayerHelp" class="sub small padded hidden help">
Simon Daron's avatar
Simon Daron committed
28
29
30
31
32
					<p>Le contenu des émissions n&#8217;étant pas limité à un niveau local, le stream permet de les écouter aux quatre coins du monde. Mais aussi et surtout, à Bruxelles, dans les zones où la radio n&#8217;est pas captée facilement.</p>
					<p>Le serveur de streaming a été mis en place par l&#8217;asbl A.C.T.I.C et est hébergé par <a href="http://www.domainepublic.net/" class='spip_out' rel='external'>Domainepublic.net</a> . Il fonctionne exclusivement grâce à des logiciels libres.</p>
					<p>Si votre logiciel ne parvient pas à lire le stream de Radio Panik, nous vous conseillons de télécharger  <a href="http://framakey.org/Portables/PortableVLC" class='spip_out' rel='external'>VLC Media Player</a>, un lecteur multimedia impressionnant de par ses nombreuses fonctionnalités (supporte de nombreux formats de stream, d&#8217;audio, de vidéo, peut servir de relais streamcast), qui fonctionne aussi bien sous Linux que sous Windows ou Mac OS.</p>
					<p><dt>URL du stream</dt><dd class="ellipsis"><a href="http://streaming.domainepublic.net:8000/radiopanik.ogg">http://streaming.domainepublic.net:8000/radiopanik.ogg</a></dd></p>
				</div> 
33
34
35
			</div> 
		</div>
		<div id="Playlist" class="sub cf">
36
			<div id="localList" class="padded">
37
				<div id="playlistLabel" class="label button">Playlist&nbsp;<span class="icon-list" title="Show/Hide playlist"></span></div>
38
39
40
41
42
43
44
45
46
47
48
49
			</div>
		</div>
		<script type="text/javascript">
			$(function() {
				var timer = null, 
				interval = 5000;
				$('#WhatsOnAir').on('load',function(){
					var WhatsOnAir = $(this);
					$.getJSON('/onair.json', function(onair) {
						WhatsOnAir.fadeOut();
						if(onair.data.episode || onair.data.emission){
							var result = '';
50
51
							result = result + ($.type(onair.data.emission) == 'object'?'<span>'+onair.data.emission.title+'</span>':'');
							result = result +  ($.type(onair.data.episode) == 'object'?'&nbsp;|&nbsp;<span>'+onair.data.episode.title+'</span>':'');
Simon Daron's avatar
Simon Daron committed
52
							//var container = $('<a>',{class:"intercepted",href:onair.data.emission.url,html:result});
Simon Daron's avatar
Simon Daron committed
53
							WhatsOnAir.html(result);
54
55
						} else if (onair.data.nonstop) {
							result = onair.data.nonstop.title;
Simon Daron's avatar
Simon Daron committed
56
							WhatsOnAir.html('<span>' + result + '</span>');
Simon Daron's avatar
Simon Daron committed
57
						}
Simon Daron's avatar
Simon Daron committed
58
						else{WhatsOnAir.html('<span>Unknown (Probably Non-Stop)</span>');}
59
						WhatsOnAir.fadeIn();
Simon Daron's avatar
Simon Daron committed
60
					});
61
62
63
				}).trigger('load');
				$('#RefreshWhatsOnAir').on('activate',function(e){
					$(this).addClass('spinning');
Simon Daron's avatar
Simon Daron committed
64
					$('#WhatsOnAir').addClass('active');
65
66
67
68
					$('#WhatsOnAir').trigger('load');
					timer = setInterval( "$('#WhatsOnAir').trigger('load');", interval);
				}).on('deactivate',function(e){
					$(this).removeClass('spinning');
Simon Daron's avatar
Simon Daron committed
69
					$('#WhatsOnAir').removeClass('active');
70
71
72
73
74
75
76
					clearInterval(timer);
				}).on('click',function(e){
					$(this).toggleClass('spinning');
					if($(this).is('.spinning')){
						$(this).trigger('activate');						
					}else{$(this).trigger('deactivate');}
					return false;
Simon Daron's avatar
Simon Daron committed
77
				});
78
				$("#DirectStreamPanikControler").on('click',function(e) {
79
					e.preventDefault();
80
81
82
					var stream = $('#DirectStreamPanik').get(0);
					if (stream.paused == false){
						stream.pause();
83
					}else{
84
						stream.play();
85
					}
Simon Daron's avatar
Simon Daron committed
86
					return false;
87
				});
88
				$('#DirectStreamPanik').on('play',function(){
89
					$('audio:not(#DirectStreamPanik)').each(function(){this.pause();});
Simon Daron's avatar
Simon Daron committed
90
					$('#streamSymbol').removeClass('icon-volume-up').addClass('icon-pause');
91
92
93
					$('#RefreshWhatsOnAir').trigger('activate');
				}).on('pause',function(){
					//$('audio:not(#DirectStreamPanik)').each(function(){this.pause();});
Simon Daron's avatar
Simon Daron committed
94
					$('#streamSymbol').addClass('icon-volume-up').removeClass('icon-pause');
95
					$('#RefreshWhatsOnAir').trigger('deactivate');
96
97
98
				});
			});
		</script>  
Simon Daron's avatar
Simon Daron committed
99
100
	</div>
</div>