From 2e07e25df702336ef8c38e2d2e060fdc7db48db3 Mon Sep 17 00:00:00 2001 From: pabloFuente Date: Mon, 16 Oct 2023 16:51:29 +0200 Subject: [PATCH] openvidu-browser: do not add default audio track to screen media steam if screen audio source --- openvidu-browser/src/OpenVidu/Publisher.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openvidu-browser/src/OpenVidu/Publisher.ts b/openvidu-browser/src/OpenVidu/Publisher.ts index 4623cf7f4a..d643593d22 100644 --- a/openvidu-browser/src/OpenVidu/Publisher.ts +++ b/openvidu-browser/src/OpenVidu/Publisher.ts @@ -504,7 +504,7 @@ export class Publisher extends StreamManager { const getMediaSuccess = async (mediaStream: MediaStream, definedAudioConstraint) => { this.clearPermissionDialogTimer(startTime, timeForDialogEvent); - if (this.stream.isSendScreen() && this.stream.isSendAudio()) { + if (this.stream.isSendScreen() && this.properties.audioSource !== 'screen' && this.stream.isSendAudio()) { // When getting desktop as user media audio constraint must be false. Now we can ask for it if required constraintsAux.audio = definedAudioConstraint; constraintsAux.video = false;