aboutsummaryrefslogtreecommitdiff
path: root/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'app.js')
-rw-r--r--app.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/app.js b/app.js
index f567987..a761769 100644
--- a/app.js
+++ b/app.js
@@ -36,12 +36,18 @@ function onGetDeviceSuccess(stream) {
36 const blob = new Blob(recordingChunks, { type: mediaRecorder.mimeType }); 36 const blob = new Blob(recordingChunks, { type: mediaRecorder.mimeType });
37 recordingChunks = []; 37 recordingChunks = [];
38 const audioElement = audioElementForBlob(blob); 38 const audioElement = audioElementForBlob(blob);
39 // TODO: autoplay audioElement if checkbox enabled 39
40 // TODO: record blob and list to local persistent storage 40 // TODO: record blob and list to local persistent storage
41 // TODO: "clear all" button to clear all clips 41 // TODO: "clear all" button to clear all clips
42 // TODO: buttons to clear individual clips 42 // TODO: buttons to clear individual clips
43 // TODO: keyboard shortcut to play clips for the ten last indexes 43 // TODO: keyboard shortcut to play clips for the ten last indexes
44
44 clips.prepend(wrapElement("li", audioElement)); 45 clips.prepend(wrapElement("li", audioElement));
46
47 if (autoplayCheckbox.checked) {
48 // TODO: stop playing any other clip
49 audioElement.play();
50 }
45 }); 51 });
46 52
47 recordBtn.addEventListener("mousedown", _event => { 53 recordBtn.addEventListener("mousedown", _event => {