onRtmpStreamingStateChanged property

void Function(String url, RtmpStreamPublishState state, RtmpStreamPublishReason reason)? onRtmpStreamingStateChanged
final

Callback when the RTMP streaming state changes.

When the RTMP streaming state changes, the SDK triggers this callback and reports the URL and current streaming state. This callback helps streaming users understand the current streaming state. If an error occurs, you can use the returned error code to identify the cause and troubleshoot the issue.

  • url The URL of the stream whose state has changed.
  • state The current streaming state. See RtmpStreamPublishState.
  • reason The reason for the streaming state change. See RtmpStreamPublishReason.

Implementation

final void Function(String url, RtmpStreamPublishState state,
    RtmpStreamPublishReason reason)? onRtmpStreamingStateChanged;