Skip to main content
Version: 6.0

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)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 micOn to false, you must call muteMyAudio(false).
  • Starting from WebPlanetKit 6.0, setting micOn to false prevents 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 micOn is false.
  • In versions prior to WebPlanetKit 5.2, the micOn feature is provided under the name audioEnabled.

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);

APIs related to initial audio state setting are as follows.

1-to-1 call

Group call