aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpacien2024-01-05 02:18:26 +0100
committerpacien2024-01-05 02:18:26 +0100
commitc74633af67e28a339c71cb015e031eb543f4307c (patch)
tree81fdbdbeaaaf3bcf10005792bd1fa375938230e2
parentc21262d3d1c3faf33bf11ba900075d68292a0a1d (diff)
downloadechoclip-c74633af67e28a339c71cb015e031eb543f4307c.tar.gz
implement clear all clip action
-rw-r--r--app.js5
-rw-r--r--index.html3
2 files changed, 5 insertions, 3 deletions
diff --git a/app.js b/app.js
index ad5dcb0..719b6ed 100644
--- a/app.js
+++ b/app.js
@@ -11,6 +11,10 @@ const autoplayCheckbox = document.querySelector("#autoplay");
11const clearBtn = document.querySelector("#clear"); 11const clearBtn = document.querySelector("#clear");
12const clips = document.querySelector("#clips"); 12const clips = document.querySelector("#clips");
13 13
14clearBtn.addEventListener("click", _event => {
15 clips.textContent = "";
16});
17
14function stopPlayer(player) { 18function stopPlayer(player) {
15 player.pause(); 19 player.pause();
16 player.currentTime = 0; 20 player.currentTime = 0;
@@ -61,7 +65,6 @@ function onGetDeviceSuccess(stream) {
61 const audioElement = makeExclusive(audioElementForBlob(blob)); 65 const audioElement = makeExclusive(audioElementForBlob(blob));
62 66
63 // TODO: record blob and list to local persistent storage 67 // TODO: record blob and list to local persistent storage
64 // TODO: "clear all" button to clear all clips
65 // TODO: buttons to clear individual clips 68 // TODO: buttons to clear individual clips
66 // TODO: keyboard shortcut to play clips for the ten last indexes 69 // TODO: keyboard shortcut to play clips for the ten last indexes
67 70
diff --git a/index.html b/index.html
index 621dc4d..a0df0ca 100644
--- a/index.html
+++ b/index.html
@@ -58,8 +58,7 @@
58 58
59 <button id="clear">Clear all</button> 59 <button id="clear">Clear all</button>
60 60
61 <ol id="clips"> 61 <ol id="clips"></ol>
62 </ol>
63 </fieldset> 62 </fieldset>
64 </section> 63 </section>
65 64