updateChannelMediaRelay

Updates the channels for media stream relay.

public abstract int updateChannelMediaRelay(
      ChannelMediaRelayConfiguration channelMediaRelayConfiguration);

Details

Deprecated:
This method is deprecated. Use startOrUpdateChannelMediaRelay 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 startChannelMediaRelay 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.

Returns

  • 0: Success.
  • < 0: Failure.