ChannelMediaRelayConfiguration

Cross-channel media stream relay configuration.

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 populates 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, indicating the SDK uses 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: The UID identifying the media stream to be relayed in the source channel. The default value is 0. Do not modify it.
destInfos
Note: If the token of any destination channel expires, all cross-channel relays will stop. Therefore, it is recommended that you set the same expiration duration for all destination channel tokens.
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, indicating the SDK uses the App ID.
    • If App Certificate is enabled, you must provide a token generated using channelName and uid.
  • uid: The UID identifying the media stream to be relayed in the destination channel. The value range is [0, 2^32 - 1]. Ensure 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: [0,6]. This parameter should match the number of ChannelMediaInfo objects defined in destInfos.