Reputation: 61
I have created an application using webRTC and tomcat 7. I am able to connect two client for video chat.one client is in sony laptop and other is in HP desktop PC(with Logitech webCam). Video is working fine but audio is generating too much echo. I have google multiple times but i didn't found any solution.
Can this echo problem be resolved at java script level using getUserMedia() or PeerConnection() APIs?
I have checked my browser versions both are chrome 28+.
Please help me out.
Upvotes: 5
Views: 7544
Reputation: 2210
adding attribute muted="muted" in video tag which is used for streaming will resolve this problem.
Upvotes: 0
Reputation: 111
You should add muted="muted"
attribute to video
element to which you are streaming local video. In this case you will hear the sound of remote peer video, but not your local video.
Upvotes: 0
Reputation: 1
the solution to avoid the local stream noise is,just go to your html file where the element is there and just add muted="muted".This will avoid the noise of local stream till the remote stream is started
Upvotes: 0
Reputation: 7236
May this comment help you. A software recommendation seems the only "simple" solution. Or settings for Windows >= 7 as explained here.
Updated:
Default volume must be set to "0" until remote media stream starts flowing; use "setTimeout" to wait at least "1" second and then set volume back to "1".
Actually, noise occurs out of "huge-audio" bandwidth which happens as soon as "onaddstream" event fires.
If you check "audioInputLevel" via "chrome://webrtc-internals" you'll see its value something like "25000" as soon as "onaddstream" event fires; however in a few milliseconds later, "audioInputLevel" goes down between 1-and-150 and stays lower.
This doc may help: http://www.slideshare.net/MuazKhan/echo-in-webrtc-why
You can even set VoiceActivityDetection:false
as SDP-constraints to minimize peer-level echo.
Upvotes: 1