setSubscribeVideoAllowlist abstract method

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

Sets the video subscription allowlist.

You can call this method to specify the video streams you want to subscribe to. This method can be called before or after joining a channel. The video subscription allowlist is not affected by muteRemoteVideoStream, muteAllRemoteVideoStreams, or autoSubscribeVideo in ChannelMediaOptions. After setting the allowlist, if you leave and rejoin the channel, the allowlist 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 video subscription allowlist. If you want to subscribe only to a specific user's video stream, add that user's ID to this list. If you want to remove a user from the allowlist, call the setSubscribeVideoAllowlist 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 allowlist.

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> setSubscribeVideoAllowlist(
    {required List<int> uidList, required int uidNumber});