简体   繁体   中英

Chrome WebRTC echo cancellation and external audio sources

I'm building a video conferencing app using Electron (version 10, Chrome v75) and WebRTC. The app has multiple windows, and in each window, I have a separate RTCPeerConnection with a different app user. The problem is that if I don't use headphones, there is a strong echo that makes the app almost unusable.

I tried setting all sorts of getUserMedia options like echoCancellation: true or googEchoCancellation: true , echoCancellationType: "browser"/"system" , but none of them managed to cancel out the echo from various sound sources.

This problem appears only on Mac and Linux, while Windows suppresses the echo quite efficiently.

I found this Chromium issue that describes a similar problem in more detail .

Also, when I try out this Fiddle on Chrome + Mac or Linux (although Chrome is not perfect for this very case, find more details here ), I see no effects of echo cancellation and the echo is still there. However, the same thing on Chrome + Windows or Firefox + any OS works perfectly.

Can it really be that AEC (echo cancellation) within Chrome does not take into account all sound sources, and does anyone know a workaround?

add video.volume = 0 to access camera and when you start recording. It works for me

I'm not sure if I'm answering your question but: Chrome/Firefox do not take into account all sound sources. Chrome handles only RTCPeerConnection audio tracks. And I think not between tabs.

Perhaps I'm misreading your question though, because you seem to think Windows works fine. But maybe Chrome is using some native Windows echo cancellation feature?

Related links:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM