CloudHub Docs
Download Documents


Cross-channel PK

Function description

Cross-channel PK means that the host’s media stream can be forwarded to multiple live channels at the same time, so that the host can interact with other hosts in real time across channels. scene. in:

Sample project

We provide an open source cross-channel PK forwarding example project, you can go to download and refer to the source code.

iOS: [CloudHub-Active] android:[CloudHub-Active]


Before implementing the cross-channel PK function, please make sure that you have implemented the basic real-time audio and video functions in the project. For details, please refer to the following document: Interactive Live Broadcast

CloudHub SDK has the following cross-channel media stream forwarding interface, which supports forwarding the media stream in the source channel to up to 4 target channels.The function of connecting microphones across live broadcast rooms:

During the cross-channel media stream forwarding process, the SDK will report the media stream through the onChannelMediaRelayStateChanged callbackFor forwarding status and events, you can refer to the following status codes or event codes to implement related business logic

status codedescribe
CloudHub_RELAY_STATE_IDLE0:DK is being initialized
CloudHub_RELAY_STATE_CONNECTING1: SDK tries to cross channels
CloudHub_RELAY_STATE_RUNNING2:The host of the source channel successfully added to the target channel
CloudHub_RELAY_STATE_FAILURE3:An exception occurred, detailed error information prompted in the code


Android reference

iOS reference

web reference

Development considerations