-
Notifications
You must be signed in to change notification settings - Fork 3
/
player.html
77 lines (72 loc) · 1.67 KB
/
player.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
<!DOCTYPE html><html><head><meta charset='utf-8'>
<meta name="viewport" content="width=device-width">
<title>DTMF - test</title>
<meta property="og:image" content="dtmf.png">
<script type="module">
import { DTMF } from "./DTMF.js";
window.onload = () => {
btn.onclick = () => {
try {
const plen = parseInt(len.value || 200) / 1000;
console.log(plen);
DTMF.play(message.value, plen);
} catch (e) {
console.log(e);
}
return false;
};
};
</script>
<style>
body {
margin: 0px;
text-align: center;
box-sizing: border-box;
font-family: sans-serif;
}
#main {
margin: 2em 0;
}
#message, #output, #len {
width: 80vw;
font-size: 150%;
padding: 0.2em;
margin: 0.2em 0;
}
#btn {
margin: 0.2em 0;
width: 80vw;
font-size: 200%;
box-sizing: border-box;
}
#desc {
display: inline-block;
margin: 1em 0;
border: 2px solid black;
width: 80vw;
font-size: 120%;
padding: 0.5em;
}
a {
color: gray !important;
}
</style>
<body>
<h1>DTMF test</h1>
<div id="main">
<form id="form">
<input type="text" id="message" placeholder="DTMF 0-9/A-D/*#"><br>
<input type="text" id="len" placeholder="1音長さ (msec) デフォルト200msec"><br>
<input type="submit" id="btn" value="DTMF変換">
</form>
<div id="desc">
<a href=https://ja.wikipedia.org/wiki/DTMF>DTMF信号</a>(ピポパ音)を合成して再生します
</div>
</div>
<div id='credit'>
App: CC BY <a href=https://fukuno.jig.jp/3056>@taisukef 一日一創「DTMFデコーダー」</a><br>
Base App: CC BY <a href=https://fukuno.jig.jp/2659>@taisukef 一日一創「生きていたポケベル入力」</a><br>
Base App: <a href=https://fukuno.jig.jp/2012/dtmf>DTMF - 一日一創2012</a><br>
</div>
</body>
<html>