setAutoGainControl

View as MarkdownOpen in Claude
setAutoGainControl(enabled): Promise<void>

Toggle browser automatic gain control on the local mic at runtime.

Parameters

enabled
booleanRequired

Whether automatic gain control should be enabled.

Returns

Promise<void> — resolves once the new constraint has been applied to the active microphone track.

Examples

Toggle from a UI switch

agcSwitch.addEventListener('change', async (e) => {
await call.setAutoGainControl(e.target.checked);
});

See