-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.html
122 lines (116 loc) · 3.23 KB
/
test.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
<!DOCTYPE html>
<html>
<head>
<title>PRG</title>
<meta charset="UTF-8">
<link rel="stylesheet" href="oo/oojs-ui.svg.css">
<link rel="stylesheet" href="oo/oojs-ui-apex.css">
<link rel="stylesheet" href="prg.css">
<script src="jquery-1.11.1.min.js"></script>
<script src="oo/oojs.js"></script>
<script src="oo/oojs-ui.js"></script>
<script src="prg.recorder.js"></script>
<script src="prg.html5recorder.js"></script>
<script src="recorder.js/recorder.js"></script>
</head>
<body style="font-family:Arial,Helvetica,sans-serif;background:black;color:white;">
<h1>PRG</h1>
<input id="prg-record-ra" type="submit" name="submit" value="Mic Access" />
<input id="prg-record-start" type="submit" name="submit" value="Record" />
<input id="prg-record-ppm" type="submit" name="submit" value="PPM" />
<input id="prg-record-wfd" type="submit" name="submit" value="WFD" />
<input id="prg-record-cwfd" type="submit" name="submit" value="Cumulative WFD" />
<input id="prg-record-tcwfd" type="submit" name="submit" value="Time WFD" />
<input id="prg-record-stop" type="submit" name="submit" value="Stop recording" />
<input id="prg-record-freezePPM" type="submit" name="submit" value="Freeze graph" />
<input id="prg-record-play" type="submit" name="submit" value="Play recording" />
<input id="prg-append-player" type="submit" name="submit" value="Append player" />
<input id="prg-append-compressed" type="submit" name="submit" value="Append compressed audio" />
<script src="prg.dialogs.js"></script>
<script>
$( function() {
var Recorder = prg.getCompatibleRecorder(),
recorder = new Recorder(),
requestRecording = function( cb ) {
if ( recording ) return cb( recording );
recorder.getRecording()
.done( function( r ) {
recording = r;
return cb( r );
} );
},
recording;
$( '#prg-record-ra' )
.click( function() {
recorder.requestMicrophoneAccess();
} );
$( '#prg-record-start' )
.click( function() {
requestRecording( function( r ) {
r.record();
} );
} );
$( '#prg-record-ppm' )
.click( function() {
requestRecording( function( r ) {
r.getPPM()
.appendTo( 'body' );
r.startRenderPPM();
} );
} );
$( '#prg-record-wfd' )
.click( function() {
requestRecording( function( r ) {
r.getWfD()
.appendTo( 'body' );
r.startRenderWfD();
} );
} );
$( '#prg-record-cwfd' )
.click( function() {
requestRecording( function( r ) {
r.getWfD( true )
.appendTo( 'body' );
r.startRenderWfD( true );
} );
} );
$( '#prg-record-tcwfd' )
.click( function() {
requestRecording( function( r ) {
r.getTimeWfD()
.appendTo( 'body' );
r.startRenderTimeWfD();
} );
} );
$( '#prg-record-stop' )
.click( function() {
recording.stopRecording();
} );
$( '#prg-record-freezePPM' )
.click( function() {
recording.stopRenderPPM();
} );
$( '#prg-record-play' )
.click( function() {
recording.play();
} );
$( '#prg-append-player' )
.click( function() {
recording.getPlayer()
.done( function( player ) {
$( 'body' )
.append( player )
} );
} );
$( '#prg-append-compressed' )
.click( function() {
recording.getCompressedPlayer()
.done( function( player ) {
$( 'body' )
.append( player )
} );
} );
} );
</script>
</body>
</html>