updateChannelMediaRelay method Null safety

Future<void> updateChannelMediaRelay(
  1. ChannelMediaRelayConfiguration channelMediaRelayConfiguration

Updates the channels for media relay.

After the channel 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 RtcChannelEventHandler.channelMediaRelayEvent callback with the ChannelMediaRelayEvent.UpdateDestinationChannel state code.


  • Call this method after the startChannelMediaRelay method to update the destination channel. See RtcChannel.startChannelMediaRelay
  • This method supports adding at most four destination channels in the relay.

Parameter channelMediaRelayConfiguration The media stream relay configuration. See ChannelMediaRelayConfiguration


Future<void> updateChannelMediaRelay(
    ChannelMediaRelayConfiguration channelMediaRelayConfiguration) {
  return _invokeMethod('updateChannelMediaRelay', {
    'channelMediaRelayConfiguration': channelMediaRelayConfiguration.toJson(),