stopRtmpStreamEx abstract method

Future<void> stopRtmpStreamEx({
  1. required String url,
  2. required RtcConnection connection,
})

Stops the RTMP stream.

Agora recommends using the more comprehensive server-side streaming feature. See Implement Server-Side RTMP Streaming. Call this method to stop the live stream on the specified RTMP streaming URL. This method can only stop one streaming URL at a time. If you need to stop multiple streaming URLs, call this method multiple times. After calling this method, the SDK triggers the onRtmpStreamingStateChanged callback locally to report the streaming status.

  • url The RTMP streaming URL. The format must be RTMP or RTMPS. The character length must not exceed 1024 bytes. Special characters such as Chinese characters are not supported.
  • connection Connection information. See RtcConnection.

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.

Implementation

Future<void> stopRtmpStreamEx(
    {required String url, required RtcConnection connection});