Search code examples
javascriptnode.jssocketsaudiowebrtc

I'm using webrtc with nodejs socket. I'm facing noise problem, my voice coming back to me


Clone this project and i'm using webrtc with nodejs socket. I'm facing noise problem, my voice coming back to me. Complete code on github - https://github.com/coding-with-chaim/toggle-cam-final

If anyone facing same issue. then please provide a solution for this.


Solution

  • The video you are attaching the stream to,

    <video autoplay id="user-video" class="user-video"></video>
    

    is not muted, hence the voice is played back. Setting the muted attribute is the easiest way to avoid that:

    <video autoplay id="user-video" class="user-video" muted></video>