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 is NULL, which means the SDK fills in the current channel name.
  • token: The token used to join the source channel. It is generated based on the channelName and uid you set in srcInfo.
    • 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 token generated using channelName and uid, and the uid must be 0.
  • 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: The token used to join the target channel. It is generated based on the channelName and uid you set in destInfos.
    • 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 token generated using channelName and uid.
  • 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.