updateChannelMediaRelay

Updates the channels for media stream relay.

Future<void> updateChannelMediaRelay(
      ChannelMediaRelayConfiguration configuration);

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 relayEventPacketUpdateDestChannel (7) state code.

Attention: Call the method after successfully calling the startChannelMediaRelay method and receiving onChannelMediaRelayStateChanged(relayStateRunning, relayOk); otherwise, the method call fails.

Parameters

configuration
The configuration of the media stream relay. See ChannelMediaRelayConfiguration.

Exceptions

When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly.

  • < 0: Failure.