forked from TommyTeaVee/ios_15_rce
-
Notifications
You must be signed in to change notification settings - Fork 0
/
microphone.html
36 lines (32 loc) · 830 Bytes
/
microphone.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
<!doctype html>
<html>
<head>
<title>WebRTC: Still photo capture demo</title>
<meta charset='utf-8'>
<link rel="stylesheet" href="https://mdn-samples.mozilla.org/s/webrtc-capturestill/main.css" type="text/css" media="all">
<script src="js/capture.js">
</script>
</head>
<body>
<div class="edit_space">
<button id="runButton" class="edit_button">run</button>
<button id="resetButton" class="reset_button">reset</button>
</div>
<script>
var song;
function setup() {
song = loadSound('assets/lucky_dragons_-_power_melody.mp3');
createCanvas(720, 200);
background(255,0,0);
}
function mousePressed() {
if ( song.isPlaying() ) { // .isPlaying() returns a boolean
song.stop();
background(255,0,0);
} else {
song.play();
background(0,255,0);
}
}</script>
</body>
</html>