From 41373591c90567af27619b2f656533647d3040d1 Mon Sep 17 00:00:00 2001 From: Miroslav Pejic Date: Thu, 8 Feb 2024 08:39:37 +0100 Subject: [PATCH] [mirotalk] - #208 discard my audio --- public/js/client.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/js/client.js b/public/js/client.js index f66aa4ba..a7c13ada 100644 --- a/public/js/client.js +++ b/public/js/client.js @@ -5231,7 +5231,10 @@ async function changeAudioDestination(audioElement = false) { const audioElements = audioMediaContainer.querySelectorAll('audio'); // change audio output for all participants audio audioElements.forEach(async (audioElement) => { - await attachSinkId(audioElement, audioDestination); + // discard my own audio on this device, so I won't hear myself. + if (audioElement.id != 'myAudio') { + await attachSinkId(audioElement, audioDestination); + } }); } }