-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathv2.html
143 lines (139 loc) · 4.65 KB
/
v2.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<!DOCTYPE html PUBLIC>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="icon" type="image/x-icon" href="radio.ico" />
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
<title>radio</title>
<style type="text/css">
body{
background-color: #00FF00;
}
#fond {
background-image:url(giphy.gif);
position:absolute;
top:30%;
left:0px;
width:100%;
height:40%;
margin:0;
z-index:-3;
}
input.casesalut {
position: absolute;
width:15%;
height:6%;
top:94%;
left:85%;
margin:0px;
background-color:white;
border-width: 5px;
background-color: transparent;
z-index:3;
}
.player{
position:absolute;
top:50%;
left:50%;
margin-left:-150px;
margin-top:-15px;
}
#mode-live{
position:absolute;
top:80%;
left:50%;
width:400px;
margin-left:-200px;
}
#mode-paslive{
position:absolute;
top:150px;
left:50%;
width:400px;
margin-left:-200px;
}
#historique{
/* background-color: #00FF00;*/
position:absolute;
text-align: center;
top:70%;
left:50%;
width:1000px;
margin-left:-500px;
}
</style>
</head>
<body>
<div id="fond">
</div>
<center><br><br>
<div>En cours: <br><br><span id="en-cours" style="font-size: 200%">...</span></div>
<center>
<div id="mode-live"><br /></div>
<div id="mode-paslive">playlist <span id="mode-playlist"></span></div>
<table id="historique">
<thead>
<tr>
<th>Historique<br><br></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<a href="playlist.m3u" target="_blank"><input id="salut" type="button" action="http://www.salutcestcool.com/" class="casesalut" value="la radio en m3u"></a>
<div class="player">
<audio autoload="true" autoplay="true" controls="true" id="player">
<source src="http://62.210.180.173:12345/salut-radio-160.mp3" type="audio/mpeg" />
<source src="http://62.210.180.173:12345/salut-radio-128.aac" type="audio/aac" />
<source src="http://62.210.180.173:12345/salut-radio-192.mp3" type="audio/mpeg" />
<source src="http://62.210.180.173:12345/salut-radio.ogg" type="audio/ogg" />
<source src="http://62.210.180.173:12345/salut-radio-128.mp3" type="audio/mpeg" />
<source src="http://62.210.180.173:12345/salut-radio-160.aac" type="audio/aac" />
<source src="http://62.210.180.173:12345/salut-radio-192.aac" type="audio/aac" />
<source src="http://62.210.180.173:12345/salut-radio-64.mp3" type="audio/mpeg" />
Ton navigateur ne sait pas jouer de la musique de radio
</audio>
</div>
<script type="text/javascript">
/* Metadata */
function metadata() {
var on_metadata = function(infos) {
if (infos['current']['live']) {
if (infos['current']['live_artist'] == 'scc') {
$('#en-cours').html('salut c\'est cool en direct ('+infos['current']['full_title']+')');
} else {
$('#en-cours').html('live diffusion en direct live ('+infos['current']['full_title']+')');
}
} else {
$('#en-cours').html(infos['current']['full_title']);
}
if (infos['current']['live']) {
$('#mode-live').show();
$('#mode-paslive').hide();
} else {
$('#mode-live').hide();
$('#mode-paslive').show();
$('#mode-playlist').html(infos['current']['mode']);
}
$('#historique tbody tr').remove();
for (var i = 0; i < infos['history'].length; i++) {
var entry = infos['history'][i];
var line = $('<tr></tr>');
line.append($('<td></td>').html(entry['full_title']));
$('#historique tbody').append(line);
}
};
var refresh_metadata = function() {
$.ajax({
url: 'http://62.210.180.173:12348/?action=infos&format=jsonp&callback=?',
dataType: 'json',
success: on_metadata
});
};
refresh_metadata();
setInterval(refresh_metadata, 5000);
};
metadata();
</script>
</body>
</html>