setLocalMicrophoneGain

View as MarkdownOpen in Claude
1setLocalMicrophoneGain(value): void

Set the local microphone gain as a percentage applied before transmission.

  • 0 = silent
  • 100 = unity (no change, default)
  • 200 = 2× digital boost (max; expect clipping / noise amplification)

Values are clamped to [0, 200]. Engages the local audio pipeline on first use (one-time cost).

Note: this is a digital multiplier applied in a Web Audio GainNode between your mic track and the RTCRtpSender — it does not change the physical mic’s hardware sensitivity. Browsers’ autoGainControl can fight the setting; call setAutoGainControl(false) for predictable behaviour.

Parameters

value
numberRequired

Gain percentage (0..200; 100 = unity).

Returns

void

Examples

1call.setLocalMicrophoneGain(value);