-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
162 lines (139 loc) Β· 4.48 KB
/
index.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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="name" content="play">
<meta name="version" content="155">
<meta name="revised" content="2024-03-22">
<meta name="license" href="LICENSE">
<meta name="rating" content="safe for kids">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Versio Duoβ―ββ―play</title>
<meta name="description" content="MIDI Player">
<link rel="canonical" href="https://versioduo.com/play">
<link rel="source" href="https://github.com/versioduo/play">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="black">
<link rel="icon" href="icons/logo-black.svg" media="(prefers-color-scheme: light)">
<link rel="icon" href="icons/logo.svg" media="(prefers-color-scheme: dark)">
<link rel="manifest" href="site.webmanifest">
<link rel="stylesheet" href="css/bulma.min.css">
<link rel="stylesheet" href="css/bulma-addons.css">
<link rel="stylesheet" href="css/fonts.css">
<link rel="stylesheet" href="css/fontawesome.min.css">
<style>
html {
background-color: black;
scroll-padding-top: 3.25rem;
scroll-behavior: smooth;
overflow: auto;
}
body {
font-family: 'DIN 1451', sans-serif;
color: hsl(0, 0%, 21%);
}
section {
background-color: hsl(0, 0%, 92%);
padding: 1rem;
}
section:not(:first-of-type) {
margin-top: 0.25rem;
}
.navbar {
opacity: 95%;
}
/* Do not mess with the DIN font, fake bold looks really ugly */
.title {
font-weight: 400;
}
.width-label {
width: 6rem;
}
.width-text-wide {
width: 12rem;
}
.width-number {
width: 4.5rem;
}
.inactive {
pointer-events: none;
}
.ellipsis {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>
</head>
<body class="has-navbar-fixed-top" data-theme="light">
<nav class="navbar is-fixed-top is-black" aria-label="navigation">
<div class="container">
<div class="navbar-brand">
<a class="navbar-home navbar-item is-size-4 pl-4" href="#">
<img src="icons/logo.svg" alt="" style="width: auto; height: 1.5rem;">
<h1 class="ml-3">
play
</h1>
</a>
<a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false">
<span class="inactive" aria-hidden="true"></span>
<span class="inactive" aria-hidden="true"></span>
<span class="inactive" aria-hidden="true"></span>
</a>
</div>
<div class="navbar-menu">
<div class="navbar-start"></div>
</div>
</div>
</nav>
<script src="js/V2Web.js"></script>
<script src="js/V2MIDI.js"></script>
<script src="js/V2MIDIFile.js"></script>
<script src="js/V2MIDISelect.js"></script>
<script src="js/V2PlayerDisplay.js"></script>
<script src="js/V2PlayerDatabase.js"></script>
<script src="js/V2PlayerLibrary.js"></script>
<script src="js/V2PlayerInstruments.js"></script>
<script src="js/V2PlayerDevices.js"></script>
<script src="js/V2PlayerMix.js"></script>
<script src="js/V2Player.js"></script>
<script>
'use strict';
{
// Initialize the menu.
V2Web.setup();
const player = new V2Player();
// Cache the content for offline operation.
V2Web.registerServiceWorker('service-worker.js', (state, newWorker) => {
// There is no worker during the intial setup.
if (!navigator.serviceWorker.controller)
return;
switch (state) {
case 'installed':
// A new version was installed into the cache and a new worker is waiting to take control.
V2Web.notifyUpdate('A fresh version is available', () => {
newWorker.postMessage({
type: 'skipWaiting'
});
});
break;
case 'activated':
// A new worker took control over the page.
location.reload();
break;
}
});
// Read commands from the URL.
const url = new URL(window.location);
// Load a file into client-side storage.
const file = url.searchParams.get('load');
if (file) {
// Remove the command from the URL.
url.searchParams.delete('load');
window.history.pushState({}, '', url);
player.requestFile(file);
}
}
</script>
</body>
</html>