setRemoteAudioPlaybackVolume method
@detail api
@author huanghao
@brief Set the audio volume of playing the received remote stream. You must join the room before calling the API. The validity of the setting is not associated with the publishing status of the stream.
@param streamId ID of stream.
@param volume The ratio between the playing voilume of the original volume. The range is [0, 400] with overflow protection. The unit is %.
For better audio quality, you are recommended to se the value to [0, 100].
@return result
- 0: Success.
- <0: Failure. See ByteRTCReturnStatus{@link #ByteRTCReturnStatus}.
@note Assume that a remote user A is always within the scope of the adjusted target users:
- When this API is used together with setRemoteRoomAudioPlaybackVolume:{@link #ByteRTCRoom#setRemoteRoomAudioPlaybackVolume}, the volume of local listening user A is the volume set by the API called later;
- When this API is used together with the setPlaybackVolume:{@link #ByteRTCEngine#setPlaybackVolume}, the volume of local listening user A will be the superposition of the two set volume effects.
- When you call this API to set the remote stream volume, if the remote user leaves the room, the setting will be invalid.
Implementation
FutureOr<int> setRemoteAudioPlaybackVolume(
NSString streamId, int volume) async {
return await nativeCall(
'setRemoteAudioPlaybackVolume:volume:', [streamId, volume]);
}