setSubscribeAudioBlocklist abstract method

Future<void> setSubscribeAudioBlocklist({
  1. required List<int> uidList,
  2. required int uidNumber,
})

Sets the audio subscription blocklist.

You can call this method to specify the audio streams you do not want to subscribe to. This method can be called before or after joining a channel. The audio subscription blocklist is not affected by muteRemoteAudioStream, muteAllRemoteAudioStreams, or autoSubscribeAudio in ChannelMediaOptions. After setting the blocklist, if you leave and rejoin the channel, the blocklist remains effective. If a user appears in both the audio subscription allowlist and blocklist, only the blocklist takes effect.

  • uidList The list of user IDs in the audio subscription blocklist. If you want to exclude a specific user's audio stream from being subscribed to, add that user's ID to this list. If you want to remove a user from the blocklist, call the setSubscribeAudioBlocklist method again and update the list of user IDs so that it no longer contains the uid of the user you want to remove.
  • uidNumber The number of users in the blocklist.

Returns When the method call succeeds, there is no return value; when 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> setSubscribeAudioBlocklist(
    {required List<int> uidList, required int uidNumber});