stopChannelMediaRelay abstract method
Stops cross-channel media stream relay. Once stopped, the broadcaster leaves all destination channels.
After the method is successfully called, the SDK triggers the onChannelMediaRelayStateChanged callback. If it reports relayStateIdle (0) and relayOk (0), it indicates that media stream relay has been stopped. If the method call fails, the SDK triggers the onChannelMediaRelayStateChanged callback and reports the status code relayErrorServerNoResponse (2) or relayErrorServerConnectionLost (8). You can call the leaveChannel method to leave the channel, and the cross-channel media stream relay will stop automatically.
Returns When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown. You need to catch the exception and handle it accordingly. See Error Codes for details and resolution suggestions. < 0: Method call failed. See Error Codes for details and resolution suggestions. -5: This method call was rejected. There is no ongoing cross-channel media stream relay.
Implementation
Future<void> stopChannelMediaRelay();