From 5e9fa399c09d16a579d298af442b0be39fa606e7 Mon Sep 17 00:00:00 2001 From: Valentin LE BESCOND Date: Thu, 12 Dec 2024 17:41:19 +0100 Subject: [PATCH] louder annotate audio --- .../docker/dashboard/app/static/read_trigger_annotate.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/services/ansible_openvpn/docker/dashboard/app/static/read_trigger_annotate.js b/services/ansible_openvpn/docker/dashboard/app/static/read_trigger_annotate.js index 5cf1485..992a76b 100644 --- a/services/ansible_openvpn/docker/dashboard/app/static/read_trigger_annotate.js +++ b/services/ansible_openvpn/docker/dashboard/app/static/read_trigger_annotate.js @@ -109,13 +109,13 @@ ws.once('interaction', () => { }) // Create Web Audio context -const audioContext = null +var audioContext = null var gainNode = null // Connect the audio to the equalizer ws.media.addEventListener( - 'canplay', + 'loadeddata', () => { if (audioContext == null) { audioContext = new AudioContext() @@ -124,7 +124,8 @@ ws.media.addEventListener( const mediaNode = audioContext.createMediaElementSource(ws.media) gainNode = audioContext.createGain(); - gainNode.gain.value = 100 * ws.media.volume; + console.log("Volume: " + ws.media.volume) + gainNode.gain.value = 200 * ws.media.volume; mediaNode.connect(gainNode); // Connect the filters to the audio output gainNode.connect(audioContext.destination)