twilio-video.js
twilio-video.js copied to clipboard
Background Noise
- [X] I have verified that the issue occurs with the latest twilio-video.js release and is not marked as a known issue in the CHANGELOG.md.
- [X] I reviewed the Common Issues and open GitHub issues and verified that this report represents a potentially new issue.
- [ ] I verified that the Quickstart application works in my environment.
- [X] I am not sharing any Personally Identifiable Information (PII) or sensitive account information (API keys, credentials, etc.) when reporting this issue.
Code to reproduce the issue: We used the code of https://github.com/twilio/twilio-video-app-react, with minimal code modification to the auth part.
Describe the bug A noise is heard in the background. This start to happen when the participants stays in the call for more than 20 minutes.
Expected behavior: We don't hear background noise.
Actual behavior: We hear background noise.
To Reproduce: Steps to reproduce the behavior:
- Start a call with 3 participant
- Wait more than 20'
- Speak in the call
Recording of the issue: We have a recording of the issue, but github don't let me upload it.
Software versions:
- [X ] Browser(s): Safary in iOS, Chrome in Android
- [X] Operating System: iOS, Android
- [X] twilio-video.js: 2.8.0-beta.2
- [X] Third-party libraries (e.g., Angular, React, etc.): React - twilio-video-app-react 0.2.1
- [X] Devices: iPhone XR / xiaomi redminote 9 / xiaomi8
I uploaded the video to this url, so it's easy to understand: https://s3.amazonaws.com/assets.doctor.com/twilio_noise.mp4
Please let me know if there is anything else required.
Interesting. We also had reports of a clicking noise sometimes, but we were not able to reproduce.
https://bugs.webkit.org/show_bug.cgi?id=218762
Twilio-video 2.9.0. We have the same issue. Background noise is heard by all participants (with very different browsers on different platforms). We are also using modificated code from twilio-react-app
Sorry for long delay - We recently found about a bug in webrtc dtx implementation that can lead to background noise on a muted audio track. twilio-video.js enables DTX (discontinuous transmission) by default for opus. I am wondering if this bug is leading to your issue. To workaround this issue, you can disable the dtx with:
const { connect } = require('twilio-video');
// Disable DTX for Opus. connect('token', { preferredAudioCodecs: [{ codec: 'opus', dtx: false }] });
Please let us know if you still seeing the audio issue and if the above workaround helps. Thanks, Makarand
@makarandp0 Would you still recommend disabling DTX? What is the benefit of keeping it enabled? We had this case here: RMcd3f54fa9f56da79dc03b8ba4cd4a663 RM1fb2bbc013fe1e43707eca169370ea28 RMc08acbe608ab7612534eb6d380a41bbf RM61ef9130625374ad0a2c82038849c73e
I am currently dealing with an issue where you can hear a white-noise from audio tracks even when they are muted. I can reproduce this problem quite easily on the twilio-video-app-react by joining into the same room on two separate browser sessions and then toggling mute on and off while making little or no noise. Eventually you will hear a white-noise even when both sessions are muted
The white noise is being transmitted to you from the remote participant's AudioTrack. You can open the element inspector and delete the <audio>
element for the remote participant and the white noise will go away (note: the remote participant is muted this entire time)
I can confirm that @makarandp0's suggestion to disable dtx
resolves this
const { connect } = require('twilio-video');
// Disable DTX for Opus.
connect('token', {
preferredAudioCodecs: [{ codec: 'opus', dtx: false }]
});
Is this a fundamental issue with DTX or something going on in the currently twilio-video code? DTX seems like a nice thing to have enabled but hearing white noise even when all participants are muted is troubling to my users.
Edit: Seems that this issue originates from the browser's WebRTC code. See WebRTC Chromium bug
I can reproduce this too. Had someone on a call with a lot of background noise. The participant muted themselves ( track.enable(false) was called). The noise was still being published. Chrome WebRTC internals was showing their disabled track was still being received, although only the noisy part - their speech was not heard.