startChannelMediaRelay abstract method

Future<void> startChannelMediaRelay(
  1. ChannelMediaRelayConfiguration channelMediaRelayConfiguration
)

Starts relaying media streams across channels. This method can be used to implement scenarios such as co-host across channels. After a successful method call, the SDK triggers the channelMediaRelayStateChanged and channelMediaRelayEvent callbacks, and these callbacks return the state and events of the media stream relay. If the channelMediaRelayStateChanged callback returns Running (2) and None (0), and the channelMediaRelayEvent callback returns SentToDestinationChannel (4), it means that the SDK starts relaying media streams between the source channel and the destination channel. If the channelMediaRelayStateChanged callback returns Failure (3), an exception occurs during the media stream relay. Call this method after joining the channel. This method takes effect only when you are a host in a live streaming channel. After a successful method call, if you want to call this method again, ensure that you call the stopChannelMediaRelay method to quit the current relay. You need to before implementing this function. We do not support string user accounts in this API.

Param channelMediaRelayConfiguration The configuration of the media stream relay. See ChannelMediaRelayConfiguration for details.

Implementation

Future<void> startChannelMediaRelay(
    ChannelMediaRelayConfiguration channelMediaRelayConfiguration);