I am trying to implement a webrtc-based chat room. And I encountered the following problems in laptop. Without connecting to any other peer, just use getUserMedia(), I can get local video stream.
When I unmuted the <video>
, echo happened.
Then I wear headphones, and found there is a continued noise. And I can hear my voice clearly.
I tried to turn down the volume, but it doesn't work.
Thanks in advance.
getAudioStreams()[0]. enabled = false or localMediaStream. getVideoStreams()[0]. enabled = false to keep the sound going but disable the video stream.
When it determines that the signal being sent out is the same signal that came in, it electronically cancels it so that the signal does not transmit back to the talker's loudspeakers, thus canceling the echo.
Make sure that you are muting the local <video>
element if you have it in the DOM:
<video id="vid1" autoplay="true" muted="muted"></video>
See this post on the discuss-webrtc mailing list for more details and the WebRTC samples.
Do the followings:
1) In localVideo do the this:
localVideo.volume = 0;
localVideo.muted = 0;
2) Do same for the remoteVideo also:
remoteVideo.volume = 0;
remoteVideo.muted = 0;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With