ChannelMediaRelayConfiguration

Cross-channel media relay configuration information.

export class ChannelMediaRelayConfiguration {
  
  srcInfo?: ChannelMediaInfo;
  
  destInfos?: ChannelMediaInfo[];
  
  destCount?: number;
}

Properties

srcInfo
Source channel information ChannelMediaInfo, including the following members:
  • channelName: Name of the source channel. The default value 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 the channelName and uid, and the uid must be 0.
  • uid: The UID that identifies the media stream being relayed in the source channel. The default value is 0. Do not modify it.
destInfos
Note: Since token expiration in any destination channel will cause all cross-channel streaming to stop, it is recommended that you set the same expiration duration for tokens in all destination channels.
Destination channel information ChannelMediaInfo, including the following members:
  • channelName: Name of the destination channel.
  • token: The token used to join the destination 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 the channelName and uid.
  • uid: The UID that identifies the media stream being relayed in the destination channel. The value range is [0, 2^32-1]. Make sure it is different from all UIDs in the destination channel. The default value is 0, which means the SDK randomly assigns a UID.
destCount
Number of destination channels. The default value is 0. Value range is [0,6]. This parameter should match the number of ChannelMediaInfo objects defined in destInfos.