CloudHub JSSDK
- Overview
- CloudHubRTC
- CloudHubRTCObject
- Client
- ClientEvent
- ClientLiveTranscoding
- ClientChannelMediaRelayConfig
- Stream
- StreamEvent
- DeviceManager
- Constants
Description of ChannelMediaRelayConfig
Description: Cross-channel media forwarding configuration class, use client.produceChannelMediaRelayConfig() generate an instance of the class.
hasDestChannelInfo(destChannelName:string):boolean
What it does: Whether there is a target channel information.
name | type | description |
---|---|---|
destChannelName | string | Target channel name. |
Example:
var hasDest = channelMediaRelayConfig.hasDestChannelInfo("destChannelName2");
getDestChannelInfo(destChannelName: string): object | void
What it does:Get the target channel information.
name | type | description |
---|---|---|
destChannelName | string | Target channel name. |
Example:
var destInfo = channelMediaRelayConfig.getDestChannelInfo(“destChannelName2”);
getAllDestChannelInfo(): object
What it does:Get all target channel information.
name | type | description |
---|---|---|
destChannelName | string | Target channel name. |
Example:
var hasDest = channelMediaRelayConfig.getAllDestChannelInfo();
setDestChannelInfo(destChannelName: string, destChannelInfo: object): void
What it does:Set the target channel information.
name | type | description |
---|---|---|
destChannelName | string | Target channel name. |
destChannelInfo | object | Target channel information, the type of which is JSON, the information that can be configured is as follows: uid? : string UserId used when forwarding to the target channel[this uid is the user id for events such as user joining / leaving received by the target channel] |
Example:
channelMediaRelayConfig.setDestChannelInfo("destChannelName", {
uid: "Relay_myChannelName_Requester_myuid"
});
removeDestChannelInfo(destChannelName: string): void
What it does: Remove the target channel information.
name | type | description |
---|---|---|
destChannelName | string | Target channel name. |
Example:
channelMediaRelayConfig.removeDestChannelInfo("destChannelName")
removeAllDestChannelInfo(destChannelName: string): void
What it does:Remove all target channel information.
Example:
channelMediaRelayConfig.removeAllDestChannelInfo()