quickblox-javascript-sdk icon indicating copy to clipboard operation
quickblox-javascript-sdk copied to clipboard

Echo/Noise in Quickblox audio call

Open kjp90 opened this issue 4 years ago • 9 comments

I have develop the videochat in Angular. I can refer Javascript SDK Sample. The sample is working fine. But when i developing the example in angular I get a lot of noise and echo in audio call. Video Call Working perfectly there is no noise or echo. Why is that so in audio call?

kjp90 avatar Mar 09 '21 05:03 kjp90

can you send your snapshot of the code (the function of getUserMedia) then only we can get to know what you are missed?

thank you

austin92jus avatar Mar 23 '21 08:03 austin92jus

var mediaParams = { audio: true, video: true, options: { muted: true, mirror: true, }, elemId: "localVideo", };

you need to mention muted as a true else it will lead to echoing your voice ..

Noise webrtc defaulty suppress the noise

austin92jus avatar Mar 23 '21 08:03 austin92jus

Tahnk you for your reply.

private getMediaParams(isAudio: boolean, localVideo: string): Object{ let mediaParams = {}; console.log("ISAUDIO--->",isAudio) if(isAudio){ mediaParams = { audio: true, video: false, options: { muted: true, // mirror: true } }; } else { mediaParams = { audio: true, video: true, elemId: localVideo, options: { muted: true, mirror: true } }; }

    return mediaParams;
}

kjp90 avatar Mar 23 '21 09:03 kjp90

i think you are facing this issues only on audio call?

austin92jus avatar Mar 23 '21 10:03 austin92jus

yes. Video call is working perfectly. no issues. audio call only having the echo & noise issue

kjp90 avatar Mar 23 '21 10:03 kjp90

mediaParams = { audio: true, video: true, elemId: localVideo, options: { muted: true, }

you also need to mentioned elemId for audio call as well

in order to minimized the echoing we need to attach the stream to one element then only we can muthed the stream

Or else you can do another way get the stream from getUsermedia and mute the stream object

austin92jus avatar Mar 23 '21 10:03 austin92jus

ok . Thank You. I will try this.

kjp90 avatar Mar 23 '21 10:03 kjp90

Hai I was tried this but it also not working. any other solutions. You have any code for this.

kjp90 avatar Mar 23 '21 10:03 kjp90

Hi @kjp90 , You can pass MediaTrackConstraints for audio and / or video key(s)

const mediaParams = {
  audio: {
    echoCancellation: true,
    noiseSuppression: true
  },
  video: false,
  options: { muted: true }
}

ghost avatar Oct 05 '21 11:10 ghost