Skip to content

createEchoCancellationLoopback

function createEchoCancellationLoopback(
context,
node,
options?
): Promise<EchoCancellationLoopback>;

Defined in: echo-loopback.ts:96

Play node through a local WebRTC loopback so Chromium’s echo canceller hears it. The node is connected to the loopback only once it is up; disconnect it from the context’s destination yourself, or it plays twice. Rejects if the loopback cannot connect. It adds the WebRTC receiver’s own buffering, which no API reports as output latency: set the audio player’s outputDelayUs if video must stay in sync with it.

Parameter Type
context EchoCancellationContext
node AudioPlayerNode
options? EchoCancellationLoopbackOptions

Promise<EchoCancellationLoopback>