-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
43 lines (38 loc) · 1.41 KB
/
index.php
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
<?php
require_once APP_PATH_DOCROOT . 'ProjectGeneral/header.php';
?>
<style>
button {
margin: 1em;
padding: 1em;
}
</style>
<div class="projhdr"><i class="fas fa-microphone"></i> Audio Recorder</div>
<button id="initBtn">Initialize</button>
<button id="startBtn" disabled>Start Recording</button>
<button id="stopBtn" disabled>Stop Recording</button>
<br>
<input type="checkbox" checked id="audioToggle" />
<label for="audioToggle">Capture Audio from Desktop</label>
<br>
<input type="checkbox" checked id="micAudioToggle" />
<label for="micAudioToggle">Capture Audio from Microphone</label><br>
<a id="download" href="#" style="display: none;">Download</a><br>
<script>
$("#audioToggle, #micAudioToggle").on('click', function() {
$("#initBtn").prop('disabled', !$("#audioToggle, #micAudioToggle").is(":checked"));
ExternalModules.UWMadison.AudioRecorder.recording.desktop = $("#audioToggle").is(":checked");
ExternalModules.UWMadison.AudioRecorder.recording.mic = $("#micAudioToggle").is(":checked");
});
$("#initBtn").on('click', function() {
$("#audioToggle, #micAudioToggle").prop('disabled', true);
$("#download").hide();
});
$("#stopBtn").on('click', function() {
$("#audioToggle, #micAudioToggle").prop('disabled', false);
$("#download").show();
});
</script>
<?php
require_once APP_PATH_DOCROOT . "ProjectGeneral/footer.php";
?>