Skip to content

Enable Echo Cancellation ​

Enables echo cancellation on an active call, so audio played through the speakers is not picked back up by the microphone and sent to the remote party as an echo.

This enables the browser's built-in echoCancellation audio processing on the call's microphone track.

Signature ​

enableEchoCancellation(callId: string): Promise<void>

Parameters ​

ParameterTypeRequiredDescription
callIdstringYesIdentifier of the active call

Return Type ​

Returns a Promise that resolves once the constraint has been applied.

Usage Example ​

const callId = 'callId';
await client.enableEchoCancellation(callId);

Errors ​

Error TypeError CodeDescription
INTERNAL_ERRORmedia:error:track_not_foundNo active call or no outgoing audio track found for provided callId
UNKNOWN_ERRORN/AUnexpected failure

For complete error reference and handling guidelines, see Error Reference.

Notes ​

  • Web only. Android and iOS do not expose echo cancellation as a call action
  • Currently marked experimental
  • Requires an active call — call this once media is established
  • Browsers enable echo cancellation by default, so this is mainly useful to restore it after disableEchoCancellation
  • Changing one audio processing constraint preserves the other two
  • onCallMediaError - Fired when media errors occur during a call
  • onRTCStatsUpdate - Reports echoReturnLoss and echoReturnLossEnhancement, which measure how much echo is being cancelled

Built with VitePress.