如何避免Javascript for WebRTC中的回声和噪音 [英] How to avoid echo and noise in javascript for webrtc

查看:929
本文介绍了如何避免Javascript for WebRTC中的回声和噪音的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试建立一个基于webrtc的聊天室.而且我在笔记本电脑中遇到了以下问题.无需连接任何其他对等设备,只需使用getUserMedia(),我就可以获取本地视频流.

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 , echo happened.

然后我戴上耳机,发现有持续的噪音.而且我可以清楚地听到我的声音.

Then I wear headphone, and found there is a continue noise. And I can hear my voice clearly.

我试图调低音量,但这没用.

I tried to turn down the volumn, but it doesn't work.

谢谢.

推荐答案

如果您在DOM中包含 local <video>元素,请确保将其静音:

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>

有关更多详细信息,请

请参见describe-webrtc邮件列表上的这篇文章 WebRTC示例.

See this post on the discuss-webrtc mailing list for more details and the WebRTC samples.

这篇关于如何避免Javascript for WebRTC中的回声和噪音的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆