setSubscribeVideoBlocklist abstract method

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

Set the blocklist of subscriptions for video streams.

You can call this method to specify the video streams of a user that you do not want to subscribe to. If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect. Once the blocklist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel. You can call this method either before or after joining a channel. The blocklist is not affected by the setting in muteRemoteVideoStream, muteAllRemoteVideoStreams and autoSubscribeAudio in ChannelMediaOptions.

  • uidList The user ID list of users that you do not want to subscribe to. If you want to specify the video streams of a user that you do not want to subscribe to, add the user ID of that user in this list. If you want to remove a user from the blocklist, you need to call the setSubscribeVideoBlocklist method to update the user ID list; this means you only add the uid of users that you do not want to subscribe to in the new user ID list.
  • uidNumber The number of users in the user ID list.

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.

Implementation

Future<void> setSubscribeVideoBlocklist(
    {required List<int> uidList, required int uidNumber});