aboutsummaryrefslogtreecommitdiff
path: root/client/index.html
blob: 1025d69404d9e0c0b9d388eaac9de924d1243e02 (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
<!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>
        <h1>Radio Station Emulator</h1>
        <div>
            <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. Three to four times would be enough.
            </p>
            <button onclick="sync_radio()">Sync!</button>
            <progress></progress>
            <div style="display:flex; flex-direction:row; align-items: center; gap: 3px;">
                <p>Show playback: </p>
                <pre class="relative-time"></pre>
                <p>/</p>
                <pre class="show-duration"></pre>
            </div>
            <div class="radio-player" hidden>
                <audio preload="auto" controls style="width: 100%;">
                    <source src=""/>
                </audio>
            </div>
        </div>
        <div>
            <h2>Current "show" info</h2>
            <div class="groups">
                <table>
                    <tr>
                        <th>Artist</th>
                        <th>Title</th>
                        <th>Duration</th>
                    </tr>
                    <tr>
                        <td class="artist"></td>
                        <td class="title"></td>
                        <td class="starts-on"></td>
                    </tr>
                </table>
            </div>
            <h2>Sync info</h2>
            <div class="groups">
                <table>
                    <tr>
                        <th>You are here for (seconds)</th>
                        <th>Started on (seconds)</th>
                        <th>Initial "tune in" time (seconds)</th>
                    </tr>
                    <tr>
                        <td class="you-are-here"></td>
                        <td class="started-on"></td>
                        <td class="current-time"></td>
                    </tr>
                </table>
            </div>
            <h2>Data segments</h2>
            <div class="groups">
                <h3>Hash of current show</h3>
                <p class="current-show-hash"></p>
                <h3>Hash of list</h3>
                <p 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>