updateChannelMediaRelayEx
Updates the channels for media stream relay.
Future<void> updateChannelMediaRelayEx( {required ChannelMediaRelayConfiguration configuration, required 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 relayEventPacketUpdateDestChannel (7) state code.
Attention: Call the method after successfully calling the startChannelMediaRelayEx method and receiving onChannelMediaRelayStateChanged
(relayStateRunning, relayOk)
; otherwise, the method call fails.Parameters
- configuration
- The configuration of the media stream relay. See ChannelMediaRelayConfiguration.
- connection
- The connection information. See RtcConnection.
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.