Enable Auto Gain Control
Enables auto gain control on an active call, letting the browser even out the volume of the microphone input so a quiet or distant speaker is raised and a loud one is not clipped.
This enables the browser's built-in autoGainControl audio processing on the call's microphone track.
Signature
enableAutoGainControl(callId: string): Promise<void>
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
callId | string | Yes | Identifier of the active call |
Return Type
Returns a Promise that resolves once the constraint has been applied.
Usage Example
const callId = 'callId';
await client.enableAutoGainControl(callId);Errors
| Error Type | Error Code | Description |
|---|---|---|
INTERNAL_ERROR | media:error:track_not_found | No active call or no outgoing audio track found for provided callId |
UNKNOWN_ERROR | N/A | Unexpected failure |
For complete error reference and handling guidelines, see Error Reference.
Notes
- Web only. Android and iOS do not expose auto gain control
- Currently marked experimental
- Requires an active call — call this once media is established
- Browsers enable auto gain control by default, so this is mainly useful to restore it after
disableAutoGainControl - Changing one audio processing constraint preserves the other two
Related Actions
disableAutoGainControl- Disable auto gain control for an active callenableNoiseSuppression- Filter background noise from the microphone inputenableEchoCancellation- Cancel speaker feedback picked up by the microphone
Related Events
onCallMediaError- Fired when media errors occur during a call