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 type | Minimum SDK version |
|---|---|
| 1-to-1 call, group call (conference) | WebPlanetKit 5.2 |
Overview
You can set the initial audio state by adding a boolean type micOn as an argument to the call start API. The initial audio state is set as follows depending on the value of micOn:
true(default value): The microphone is activated and turned on at the start of the call, and audio captured by the microphone is transmitted to peers.false: The microphone is not activated at the start of the call and remains turned off, and audio is not transmitted to peers.
Note
- To transmit audio again after setting
micOntofalse, you must callmuteMyAudio(false). - Starting from WebPlanetKit 6.0, setting
micOntofalseprevents the microphone from being accessed at the start of the call. As a result, the browser microphone permission prompt is not shown until the user unmutes for the first time, and the browser's microphone indicator does not appear at the start of the call.- In versions prior to WebPlanetKit 6.0, the microphone is accessed even when
micOnisfalse.
- In versions prior to WebPlanetKit 6.0, the microphone is accessed even when
- In versions prior to WebPlanetKit 5.2, the
micOnfeature is provided under the nameaudioEnabled.
Setting the initial audio state at the start of a call
You can set the initial audio state by adding micOn to MakeCallParams, VerifyCallParams, or ConferenceParams.
-
1-to-1 call
// Caller side
const makeCallParams = {
...,
micOn: false
};
planetKit.makeCall(makeCallParams);// Callee side
const verifyCallParams = {
...,
micOn: false
};
planetKit.verifyCall(verifyCallParams); -
Group call
const conferenceParams = {
...,
micOn: false
};
planetKit.joinConference(conferenceParams);
Related API
APIs related to initial audio state setting are as follows.
1-to-1 call
micOnofMakeCallParamsmicOnofVerifyCallParams-
makeCall() -
verifyCall() -
muteMyAudio()ofCall