ChannelMediaRelayConfiguration
Configuration information of relaying media streams across channels.
struct ChannelMediaRelayConfiguration {
ChannelMediaInfo *srcInfo;
ChannelMediaInfo *destInfos;
int destCount;
ChannelMediaRelayConfiguration()
: srcInfo(nullptr)
, destInfos(nullptr)
, destCount(0)
{}
};
Attributes
- srcInfo
-
The information of the source channel ChannelMediaInfo. It contains the following members:
- channelName: The name of the source channel. The default value is
NULL
, which means the SDK applies the name of the current channel. - uid: The unique user ID to identify the relay stream in the source channel. The default value is 0, which means the SDK generates a random
uid
. You must set it as 0. - token: The token for joining the source channel. This token is generated with the channelName and uid you set in srcInfo.
- 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, and the uid must be set as 0.
- If you have not enabled the App Certificate, set this parameter as the default value
- channelName: The name of the source channel. The default value is
- destInfos
-
The information of the destination channel 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. Do not set this parameter as the user ID of the host in the destination channel, and ensure that this user ID is different from any other user ID in the channel.
- token: The token for joining the destination channel. It 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.
- If you have not enabled the App Certificate, set this parameter as the default value
- destCount
- The number of destination channels. The default value is 0, and the value range is from 0 to 4. Ensure that the value of this parameter corresponds to the number of ChannelMediaInfo structs you define in destInfo.