updateChannelMediaRelayEx

Updates the channels for media stream relay.

public abstract int updateChannelMediaRelayEx(
      ChannelMediaRelayConfiguration channelMediaRelayConfiguration, RtcConnection connection);

Details

Deprecated:
This method is deprecated. Use startOrUpdateChannelMediaRelayEx instead.

After the media relay starts, if you want to relay the media stream to more channels, or leave the current relay channel, you can call this method.

After a successful method call, the SDK triggers the onChannelMediaRelayEvent callback with the RELAY_EVENT_PACKET_UPDATE_DEST_CHANNEL (7) state code.

Attention: Call the method after successfully calling the startChannelMediaRelayEx method and receiving onChannelMediaRelayStateChanged(RELAY_STATE_RUNNING, RELAY_OK); otherwise, the method call fails.

Parameters

channelMediaRelayConfiguration
The configuration of the media stream relay. See ChannelMediaRelayConfiguration.
connection
The connection information. See RtcConnection.

Returns

  • 0: Success.
  • < 0: Failure.