diff --git a/src/lib/components/chat/MessageInput/CallOverlay.svelte b/src/lib/components/chat/MessageInput/CallOverlay.svelte index 8e2c77a87..799567730 100644 --- a/src/lib/components/chat/MessageInput/CallOverlay.svelte +++ b/src/lib/components/chat/MessageInput/CallOverlay.svelte @@ -243,6 +243,15 @@ mediaRecorder.start(); }; + const stopAudioStream = async () => { + if (audioStream) { + const tracks = audioStream.getTracks(); + tracks.forEach((track) => track.stop()); + } + + audioStream = null; + }; + // Function to calculate the RMS level from time domain data const calculateRMS = (data: Uint8Array) => { let sumSquares = 0; @@ -911,6 +920,8 @@