summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Cully <bjc@spork.org>2025-07-29 10:11:43 -0400
committerBrian Cully <bjc@spork.org>2025-07-29 10:11:43 -0400
commit18dc968fb66087fc45b12e6a8b05fa274a939f42 (patch)
tree5fd7ba67757640d5fbf54580d692be00a8673b80
parent6b8fdcd31e4df2c8e2321f5e57fa21702837cd77 (diff)
downloadchords-main.tar.gz
chords-main.zip
real-time volumeHEADmain
-rw-r--r--player.mjs5
1 files changed, 2 insertions, 3 deletions
diff --git a/player.mjs b/player.mjs
index 070eadf..6a4e39a 100644
--- a/player.mjs
+++ b/player.mjs
@@ -30,10 +30,9 @@ export default class extends HTMLElement {
this.globalGain.connect(this.audioCtx.destination);
this.globalGain.gain.setValueAtTime(this.volume, this.audioCtx.currentTime);
- this.querySelector('.volume').onchange = e => {
- console.debug('vol changed', e, this.volume);
+ this.querySelector('.volume').addEventListener('input', _ => {
this.globalGain.gain.setValueAtTime(this.volume, this.audioCtx.currentTime);
- }
+ });
}
get volume() {