+-
js调用webrtc相关api怎么实现回声消除和消除噪音

html代码
<video id="localVideo" class="localVideo" autoplay muted></video>
<video id="remoteVideo" class="remoteVideo" autoplay></video>

js相关
let constraints;
if (type == 'audio') {
constraints = {

/**
看约束调教有这些,,但是无法属性确定是否有效

*/
audio: {

  // 设置回音消除

noiseSuppression: true,
// 设置降噪
echoCancellation: true,
},
video: false,
}
} else {
constraints = {

audio: {
  // 设置回音消除

noiseSuppression: true,
// 设置降噪
echoCancellation: true,
},
video: true,
}
}
try {
let stream = await navigator.mediaDevices.getUserMedia(constraints);
return stream;
} catch (e) {
return false;
}

有没有大佬做过,,是通过算法还是什么?我在网上找的相关的都加了。。通话也已经实现了。。就是说老是有回声。。