blob: f5a9b5333466fbd57a1cd52421a9e9ef1cfc82a3 (
plain)
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
144
145
146
147
148
149
150
151
|
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<title>Radio Station Emulator</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet preload" href="./css/styles.css" type="text/css" as="style"/>
</head>
<body>
<div>
<h1>Radio Station Emulator</h1>
<p>
If you are visiting for the first time, you might need to "Allow Audio" first.
Please do and refresh the page.
</p>
<p>
Sometimes, you will need to press the "Sync" button more than once. That's mostly
due to bandwidth capabilities of both the server and the client. The "tune" would
be right if you press it multiple times and land near the same timespace over and
over.
</p>
<p>
Ideally, if "Listening at:" and "Show playback:" have the same value then you are
in sync!
</p>
<div>
<p>Download progress:</p>
<progress class="dl-progress" max="100"></progress>
</div>
<div>
<p>Live progress:</p>
<progress class="play-progress"></progress>
</div>
<button onclick="sync_radio()">Sync!</button>
<div style="
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items: baseline;
justify-content: space-evenly;
">
<div style="
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items: baseline;
justify-content: space-evenly;
">
<p>Listening at:</p>
<pre class="listening-at"></pre>
</div>
<div style="
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items: baseline;
justify-content: space-evenly;
">
<p>Show playback: </p>
<pre class="relative-time"></pre>
<p>/</p>
<pre class="show-duration"></pre>
</div>
</div>
<div class="radio-player">
<audio preload="auto" controls muted></audio>
</div>
</div>
<div>
<h2>Current "show" info</h2>
<div class="groups">
<table>
<tr>
<th>Artist</th>
<td class="artist"></td>
</tr>
<tr>
<th>Title</th>
<td class="title"></td>
</tr>
<tr>
<th>Starts On</th>
<td class="starts-on"></td>
</tr>
<tr>
<th>Duration</th>
<td class="show-duration"></td>
</tr>
</table>
<h3>Hash of current show</h3>
<p style="overflow-x: auto;" class="current-show-hash"></p>
<h3>Show info (JSON)</h3>
<pre style="overflow-x: auto;" class="show-info"></pre>
</div>
<h2>Sync info</h2>
<div class="groups">
<table>
<tr>
<th>Time elapsed since visited (seconds)</th>
<td class="you-are-here"></td>
</tr>
<tr>
<th>List started on (seconds)</th>
<td class="started-on"></td>
</tr>
<tr>
<th>List duration (seconds)</th>
<td class="list-duration"></td>
</tr>
</table>
<h3>Calculations</h3>
<table>
<tr>
<th>Times list played completely until now</th>
<td class="min-played"></td>
</tr>
<tr>
<th>Times played until now</th>
<td class="max-played"></td>
</tr>
<tr>
<th>Dt</th>
<td class="d-t"></td>
</tr>
<tr>
<th>Delta time</th>
<td class="delta-time"></td>
</tr>
<tr>
<th>Initial "tune in" time (seconds)</th>
<td class="current-time"></td>
</tr>
</table>
<h3>List info (JSON)</h3>
<pre style="overflow-x: auto;" class="list-info"></pre>
</div>
<h2>Previously played:</h2>
<div class="previously-played">
</div>
<h2>Data segments</h2>
<div class="groups">
<h3>Hash of list</h3>
<p style="overflow-x: auto;" class="list-hash"></p>
</div>
</div>
<div>
<a href="./data.html" target="_blank">Data</a>
</div>
<script src="./js/radio_emulator.js"></script>
</body>
</html>
|