setDestChannelInfo

Sets the information of the destination channel.

public void setDestChannelInfo(String channelName, ChannelMediaInfo destInfo) {
  if (destInfos.size() < Constants.MAX_CROSS_DEST_CHANNEL_SIZE) {
    destInfos.put(channelName, destInfo);
  }
}

Parameters

channelName
The channel name of the target channel.
destInfo
The information of the destination channel. See ChannelMediaInfo. It contains the following members:
  • channelName: The name of the destination channel.
  • uid: The unique user ID to identify the relay stream in the destination channel. The value ranges from 0 to (2 32-1). To avoid user ID conflicts, this user ID must be different from any other user ID in the destination channel. The default value is 0, which means the SDK generates a random user ID.
  • token: The token for joining the destination channel. This token is generated with the channelName and uid you set in destInfos.
    • If you have not enabled the App Certificate, set this parameter as the default value NULL, which means the SDK applies the App ID.
    • If you have enabled the App Certificate, you must use the token generated with the channelName and uid.