setRemoteAudioAttenuation abstract method
Sets the sound attenuation effect for a specified user.
uidUser ID. Must match the user ID used when joining the channel.attenuationThe sound attenuation coefficient for the specified user, ranging from0,1.forceSetWhether to forcibly apply the sound attenuation effect for the user: true : Forces the use of attenuation to set the user's sound attenuation effect. In this case, the audioAttenuation value set in SpatialAudioZone has no effect on this user. false : Does not forcibly apply attenuation to the user. Behavior depends on the following: If the audio source and listener are in and out of the sound insulation zone respectively, the attenuation effect is determined by audioAttenuation in SpatialAudioZone. If the audio source and listener are both inside or both outside the same sound insulation zone, the attenuation effect is determined by the attenuation parameter in this method.
Returns When the method call succeeds, there is no return value; when it fails, the AgoraRtcException exception is thrown. You need to catch the exception and handle it accordingly. See Error Codes for details and resolution suggestions.
Implementation
Future<void> setRemoteAudioAttenuation(
{required int uid, required double attenuation, required bool forceSet});