-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
60 lines (57 loc) · 1.84 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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>RURI | コントロールパネル</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
<script src="/socket.io/socket.io.js"></script>
<link href="./dist/css/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="./dist/css/flat-ui.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<style>
body {
text-align: center;
font-family: 'Roboto', sans-serif;
}
</style>
<script>
$(function () {
io.connect().emit('getMusicList');
$('#volume').on('input', function () {
io.connect().emit('music', 'volume', $(this).val())
});
io.connect().on('connect', function (files) {
console.dir(files);
console.dir('test');
$.each(files.list,function(index, elem) {
$('<li></li>').append(elem).appendTo('#result');
});
});
});
</script>
</head>
<body>
<h1>瑠璃(RURI)</h1>
<hr>
<h3>音楽のアップロード</h3>
<input type="file" id="fileInput" accept='audio/mp3'></input>
<hr>
<ul id="result"></ul>
<h3>音楽再生</h3>
<button style="display: inline-block;" id="play" onclick="
var socket = io.connect();
socket.emit('music', 'play')
">ランダムに再生</button>
<button style="display: inline-block;" id="play" onclick="
var socket = io.connect();
socket.emit('music', 'pause');
">一時停止・再開</button>
<br>
<div style="background-color: #000;"></div>
<p style="display: inline-block;">0%</p>
<input type="range" value="100" max="100" min="0" id="volume" style="display: inline-block;">
<p style="display: inline-block">100%</p>
</div>
</body>
</html>