-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
83 lines (81 loc) · 2.94 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
<!DOCTYPE html>
<html lang="en" data-dtinth>
<head>
<title>MIDI-RTC</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Arimo:ital,wght@0,400;0,700;1,400;1,700&display=swap"
/>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/combine/npm/[email protected]/out/dark.min.css,gh/dtinth/[email protected]/dtinth-water.min.css"
/>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap-grid.min.css">
<link rel="stylesheet" href="/style.css">
</head>
<body>
<h1>MIDI-RTC</h1>
<p>
Send and receive MIDI messages over WebRTC. Powered by simple-peer, P2PT and Web MIDI API.
</p>
<div id="app" class="container">
<p id="connection-info">
Other peers can connect to you by going to {{url}}
</p>
<p id="connection-status">
Connected to {{activeConnections}} other peer{{activeConnections === 1 ? '' : 's'}}.
</p>
<template v-if="error">
{{ error }}
</template>
<template v-else>
<div class="row">
<div>
<h2>MIDI input</h2>
<port-selector :selected="currentInput" :available="availableInputs" @select="selectedInput = $event"></port-selector>
</div>
<div class="arrow align-self-center">
→
</div>
<div>
<h2>WebRTC</h2>
<ul>
<li>Received: {{ received }}</li>
<li>Sent: {{ sent }}</li>
</ul>
</div>
<div class="arrow align-self-center">
→
</div>
<div>
<h2>MIDI output</h2>
<port-selector :selected="currentOutput" :available="availableOutputs" @select="selectedOutput = $event"></port-selector>
</div>
</div>
</template>
</div>
<script type="x-template" id="port-selector">
<div>
<ul class="port-selector">
<li v-for="option of options" :key="option.key" :class="{ 'is-selected': option.selected }">
<a href="javascript:" @click="select(option)">{{ option.text }}</a>
</li>
</ul>
</div>
</script>
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/index.js"
integrity="sha256-IBqKNNdZBkvlyBDTBnPO57idR/RhhMygjQ59d9MsNZ4="
crossorigin="anonymous"
></script>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script src="/script.js"></script>
<!-- include the Glitch button to show what the webpage is about and
to make it easier for folks to view source and remix -->
<div class="glitchButton" style="position:fixed;top:20px;right:20px;"></div>
<script src="https://button.glitch.me/button.js"></script>
</body>
</html>