setPlaybackVolume abstract method
Adjusts the playback volume of the mixed remote audio.
volume
: Ratio(%) of capture volume to original volume with a range of [0, 400]
.
This changes the volume property of the audio data other than the hardware volume.
For better call quality, it is recommended to set the volume value to [0,100]
.
- 0: Mute.
- 100: Original volume.
- 400: Four times the original volume with signal-clipping protection.
Return value:
0
: Success.<0
: Failure. See ReturnStatus for the reason.
You can call this API both before and during playing the audio. Suppose a remote user A is always within the range of the target user whose playback volume will be adjusted, if you use both this method and RTCVideo.setRemoteAudioPlaybackVolume/RTCRoom.setRemoteRoomAudioPlaybackVolume, the volume that the local user hears from user A is the overlay of both settings.
Implementation
Future<int?> setPlaybackVolume(int volume);