Core features

The Video SDK for Windows lets users speak and hear each other in a session over VoIP. Users who can't connect over VoIP can dial in by phone. For more information, see Public Switched Telephone Network (PSTN).

The core controls let you check audio status, connect to audio, mute and unmute, and disconnect. For host-only controls, see Host audio controls.

You control user audio with IZoomVideoSDKAudioHelper. Before changing any audio state, check whether the user is already connected to audio by reading the user's ZoomVideoSDKAudioType.

Check whether a user is connected to audio

To determine a user's audio state, read the audioType from their ZoomVideoSDKAudioStatus.

// Get the user's audio status.
ZoomVideoSDKAudioStatus audioStatus = pUserInfo->getAudioStatus();
// Get the user's audio type.
ZoomVideoSDKAudioType audioType = audioStatus.audioType;

audioType is one of the values defined on ZoomVideoSDKAudioType.

ValueMeaning
ZoomVideoSDKAudioType_NoneThe user is not connected to session audio.
ZoomVideoSDKAudioType_VOIPThe user is connected over VoIP (microphone and speaker).
ZoomVideoSDKAudioType_TelephonyThe user is connected by phone dial-in. For more information, see Public Switched Telephone Network (PSTN).

Connect to audio

If the user is not already connected, connect to the audio through the IZoomVideoSDKAudioHelper.

if (audioType == ZoomVideoSDKAudioType_None) {
    // User's audio is not connected.
    // Get the IZoomVideoSDKAudioHelper to perform audio actions.
    IZoomVideoSDKAudioHelper* pAudioHelper = m_pVideoSDK->getAudioHelper();
    if (pAudioHelper) {
        // Connect the user's audio.
        pAudioHelper->startAudio();
    }
} else {
    // User is already connected to audio.
}

Mute and unmute a user

Once connected, mute a user's audio by calling muteAudio with the associated IZoomVideoSDKUser.

// Get the IZoomVideoSDKAudioHelper to perform audio actions.
IZoomVideoSDKAudioHelper* pAudioHelper = m_pVideoSDK->getAudioHelper();
if (pAudioHelper) {
    // Mute the user.
    pAudioHelper->muteAudio(pUser);
}

Unmute a user's audio in the same way using unMuteAudio.

// Get the IZoomVideoSDKAudioHelper to perform audio actions.
IZoomVideoSDKAudioHelper* pAudioHelper = m_pVideoSDK->getAudioHelper();
if (pAudioHelper) {
    // Unmute the user.
    pAudioHelper->unMuteAudio(pUser);
}

When the local user is the session host, muting and unmuting behave differently for remote users. For more information, see Host audio controls.

Disconnect from audio

To disconnect a user from audio completely, call stopAudio. Use this only when the user explicitly disconnects. To silence a user temporarily, use muteAudio instead.

// Get the IZoomVideoSDKAudioHelper to perform audio actions.
IZoomVideoSDKAudioHelper* pAudioHelper = m_pVideoSDK->getAudioHelper();
if (pAudioHelper) {
    // Disconnect the user's audio.
    pAudioHelper->stopAudio();
}