ChannelMediaRelayConfiguration
Configuration information for media stream relay across channels.
class ChannelMediaRelayConfiguration {
const ChannelMediaRelayConfiguration(
{this.srcInfo, this.destInfos, this.destCount});
@JsonKey(name: 'srcInfo')
final ChannelMediaInfo? srcInfo;
@JsonKey(name: 'destInfos')
final List<ChannelMediaInfo>? destInfos;
@JsonKey(name: 'destCount')
final int? destCount;
factory ChannelMediaRelayConfiguration.fromJson(Map<String, dynamic> json) =>
_$ChannelMediaRelayConfigurationFromJson(json);
Map<String, dynamic> toJson() => _$ChannelMediaRelayConfigurationToJson(this);
}
Properties
- srcInfo
- Source channel information ChannelMediaInfo, which 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 using thechannelNameanduid, and theuidmust be 0.
- If App Certificate is not enabled, you can set this parameter to the default value
uid: The UID that identifies the media stream being relayed in the source channel. Default is 0. Do not modify.
- destInfos
-
Note: If the token for any destination channel expires, all cross-channel relays will stop. Therefore, it is recommended that you set the same expiration duration for the tokens of all destination channels.Destination channel information ChannelMediaInfo, which includes the following members:
channelName: Name of the destination channel.token: Thetokenused to join the destination 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 using thechannelNameanduid.
- If App Certificate is not enabled, you can set this parameter to the default value
uid: The UID that identifies the media stream being relayed in the destination channel. The value range is 0 to (2^32 - 1). Ensure it is different from all UIDs in the destination channel. Default is 0, which means the SDK assigns a UID randomly.
- destCount
- Number of destination channels. Default is 0. Value range is [0,6]. This parameter should match the number of ChannelMediaInfo objects defined in
destInfos.