Skip to main content
Version: 7.1

Initial audio state

You can set the initial audio state of the local user, which is applied when starting a 1-to-1 call or joining a group call.

Supported call typeMinimum SDK version
1-to-1 call, group call (conference)PlanetKit 7.1

Overview​

The EInitialMyAudioState enum defines the following values for the initial audio state:

  • PLNK_INITIAL_MY_AUDIO_STATE_UNMUTED: The microphone is activated and audio captured by the microphone is transmitted.
  • PLNK_INITIAL_MY_AUDIO_STATE_MUTED: The microphone is not activated and audio is not transmitted.
Note
  • The default value of the APIs described below is PLNK_INITIAL_MY_AUDIO_STATE_UNMUTED.
  • If you set the initial audio state to PLNK_INITIAL_MY_AUDIO_STATE_MUTED, the local user's microphone is not activated at the start of the call and audio is not transmitted to peers. To transmit audio, you must call MuteMyAudio() with false afterward.
  • Starting with PLNK_INITIAL_MY_AUDIO_STATE_MUTED prevents the microphone indicator from appearing at call start, since the microphone device is not activated until unmuted.

Setting the initial audio state​

Depending on the call type, the API used to set the initial audio state is as follows.

1-to-1 call​

  • Caller side: Use SetInitialMyAudioState() of MakeCallParam when making a call.
  • Callee side: Set the eInitialMyAudioState parameter of AcceptCall() when accepting a call.

For a code example of setting the initial audio state in 1-to-1 calls, see 1-to-1 audio call and 1-to-1 video call.

Group call​

Use SetInitialMyAudioState() of ConferenceParam when joining a group call.

For a code example of setting the initial audio state in group calls, see Group audio call and Group video call.

APIs related to initial audio state setting are as follows.

Common​

1-to-1 call​

Group call​