ChannelMediaRelayConfiguration
Configuration information for media stream relay across channels.
public class ChannelMediaRelayConfiguration
{
public ChannelMediaRelayConfiguration()
{
srcInfo = null;
destInfos = new ChannelMediaInfo[0];
destCount = 0;
}
public ChannelMediaRelayConfiguration(ChannelMediaInfo srcInfo, ChannelMediaInfo[] destInfos, int destCount)
{
this.srcInfo = srcInfo;
this.destInfos = destInfos ?? new ChannelMediaInfo[0];
this.destCount = destCount;
}
public ChannelMediaInfo srcInfo { set; get; }
public ChannelMediaInfo[] destInfos { set; get; }
public int destCount { set; get; }
}
Properties
- srcInfo
- Source channel information ChannelMediaInfo, includes the following members:
channelName: Name of the source channel. Default isNULL, which means the SDK fills in the current channel name.token: Thetokenused to join the source channel. It is generated based on thechannelNameanduidyou set insrcInfo.- If App Certificate is not enabled, you can set this parameter to the default value
NULL, which means the SDK fills in the App ID. - If App Certificate is enabled, you must provide a
tokengenerated usingchannelNameanduid, and theuidmust be 0.
- If App Certificate is not enabled, you can set this parameter to the default value
uid: UID identifying the media stream being relayed in the source channel. Default is 0. Do not modify.
- destInfos
-
Note: Because the expiration of the token in any target channel will cause all cross-channel streaming to stop, it is recommended that you set the same expiration duration for the tokens in all target channels.Target channel information ChannelMediaInfo, includes the following members:
channelName: Name of the target channel.token: Thetokenused to join the target channel. It is generated based on thechannelNameanduidyou set indestInfos.- If App Certificate is not enabled, you can set this parameter to the default value
NULL, which means the SDK fills in the App ID. - If App Certificate is enabled, you must provide a
tokengenerated usingchannelNameanduid.
- If App Certificate is not enabled, you can set this parameter to the default value
uid: UID identifying the media stream being relayed in the target channel. The value range is [0, 2^32 - 1]. Make sure it is different from all UIDs in the target channel. Default is 0, which means the SDK assigns a UID randomly.
- destCount
- Number of target channels. Default is 0. Value range is [0,6]. This parameter should match the number of ChannelMediaInfo objects you define in
destInfos.