diff --git a/front/src/Components/EnableCamera/HorizontalSoundMeterWidget.svelte b/front/src/Components/EnableCamera/HorizontalSoundMeterWidget.svelte index e7f721c1..84352ebb 100644 --- a/front/src/Components/EnableCamera/HorizontalSoundMeterWidget.svelte +++ b/front/src/Components/EnableCamera/HorizontalSoundMeterWidget.svelte @@ -10,9 +10,11 @@ let timeout; const soundMeter = new SoundMeter(); + let display = false; $: { if (stream && stream.getAudioTracks().length > 0) { + display = true; soundMeter.connectToSource(stream, new AudioContext()); if (timeout) { @@ -28,6 +30,8 @@ } }, 100); + } else { + display = false; } } @@ -53,7 +57,7 @@ -