Function: prepareAudioSessionForCall()
ts
function prepareAudioSessionForCall(hasVideo): void;Defined in: Calls.ts:244
Prepares the audio session for an upcoming call.
This snapshots the current audio configuration (for later restoration) and pre-configures the audio session for the call. Called automatically when reporting/starting a call, but can be called manually for early preparation.
Parameters
| Parameter | Type | Description |
|---|---|---|
hasVideo | boolean | Whether to configure for video calls (uses speaker by default) or audio-only calls (uses earpiece by default). |
Returns
void
See
- restoreAudioSession — call this after the call ends to revert the session configuration.
- getAudioSession — inspect the resulting audio session state.