public class ChannelMediaRelayConfiguration
extends java.lang.Object
Constructor and Description |
---|
ChannelMediaRelayConfiguration()
The configuration of the channel media relay.
|
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,ChannelMediaInfo> |
getDestChannelMediaInfos() |
ChannelMediaInfo |
getSrcChannelMediaInfo() |
void |
removeDestChannelInfo(java.lang.String channelName)
Removes the destination channel.
|
void |
setDestChannelInfo(java.lang.String channelName,
ChannelMediaInfo destInfo)
Sets the information of the destination channel.
|
void |
setSrcChannelInfo(ChannelMediaInfo srcInfo)
Sets the information of the source channel.
|
public ChannelMediaRelayConfiguration()
public void setSrcChannelInfo(ChannelMediaInfo srcInfo)
srcInfo
- The information of the source channel: ChannelMediaInfo
. It contains the following members:
- `channelName`: The name of the source channel. The default value is NULL, which means the SDK
applies the name of the current channel.
- `uid`: ID of the host whose media stream you want to relay. The default value is 0, which
means the SDK generates a random UID. You must set it as 0.
- `token`: The token for joining the source channel. It is generated with the `channelName` and
`uid` you set in `srcInfo`.
- If you have not enabled the App Certificate, set this parameter as the default value NULL,
which means the SDK applies the App ID.
- If you have enabled the App Certificate, you must use the token generated with the
`channelName` and `uid`, and the `uid` must be set as 0.public void setDestChannelInfo(java.lang.String channelName, ChannelMediaInfo destInfo)
channelName
- The name of the destination channel. Ensure that the value of this parameter
is the same as that of the `channelName` member in `destInfo`.destInfo
- The information of the destination channel: ChannelMediaInfo
. It contains the following members:
- `channelName`: The name of the destination channel.
- `uid`: ID of the host in the destination channel. The value ranges from 0 to
(232-1). To avoid UID conflicts, this uid must be different from any other UIDs in
the destination channel. The default value is 0, which means the SDK generates a random UID.
- `token`: The token for joining the destination channel. It is generated with the
`channelName` and `uid` you set in `destInfo`.
- If you have not enabled the App Certificate, set this parameter as the default value NULL,
which means the SDK applies the App ID.
- If you have enabled the App Certificate, you must use the token generated with the
`channelName` and `uid`.public void removeDestChannelInfo(java.lang.String channelName)
channelName
- The name of the destination channel.public ChannelMediaInfo getSrcChannelMediaInfo()
public java.util.Map<java.lang.String,ChannelMediaInfo> getDestChannelMediaInfos()