Volume settings

更新时间:
复制 MD 格式

The Real-Time Communication (RTC) software development kit (SDK) provides various interfaces to set the volume. This topic describes how to use these interfaces and explains the relationships between them.

Feature introduction

The following table describes the SDK interfaces for various volume settings.

Category

Interface

Notes

Accompaniment volume

setAudioAccompanyVolume

setAudioAccompanyPlayoutVolume

setAudioAccompanyPublishVolume

The setAudioAccompanyVolume method sets both the local playback volume and the stream ingest volume. The setAudioAccompanyPlayoutVolume and setAudioAccompanyPublishVolume methods set the local playback volume and the stream ingest volume separately.

Important

Setting the volumes separately overwrites the previous unified setting.

Sound effect volume

setAudioEffectPublishVolume

setAudioEffectPlayoutVolume

setAudioEffectPublishVolume sets the stream ingest volume for sound effects. setAudioEffectPlayoutVolume sets the local playback volume for sound effects.

Recording volume

setRecordingVolume

Adjusts the volume of the captured audio for stream ingest.

Playback volume

setPlayoutVolume

Sets the playback volume for audio from a remote stream.

Stop publishing local audio

muteLocalMic

This method publishes empty audio frames but does not stop audio capture. Therefore, in-ear monitoring can still be heard.

Stop playing remote audio

muteRemoteAudioPlaying

Mutes the mixed audio of a specific remote user.

Volume setting relationships

The following graph shows the relationships between the volume settings.