RTMP_STREAM_PUBLISH_STATE

Streaming state.

Enumerations

RTMP_STREAM_PUBLISH_STATE_IDLE
0: Streaming has not started or has ended.
RTMP_STREAM_PUBLISH_STATE_CONNECTING
1: Connecting to the streaming server and CDN server.
RTMP_STREAM_PUBLISH_STATE_RUNNING
2: Streaming is in progress. This state is returned after successful streaming.
RTMP_STREAM_PUBLISH_STATE_RECOVERING
3: Recovering the stream. When a CDN exception occurs or the stream is briefly interrupted, the SDK automatically attempts to recover the stream and returns this state.
  • If the stream is successfully recovered, it enters the RTMP_STREAM_PUBLISH_STATE_RUNNING(2) state.
  • If the server encounters an error or recovery fails within 60 seconds, it enters the RTMP_STREAM_PUBLISH_STATE_FAILURE(4) state. If you think 60 seconds is too long, you can also try reconnecting manually.
RTMP_STREAM_PUBLISH_STATE_FAILURE
4: Streaming failed. After failure, you can troubleshoot the cause using the returned error code.
RTMP_STREAM_PUBLISH_STATE_DISCONNECTING
5: The SDK is disconnecting from the streaming server and CDN server. When you call the StopRtmpStream method to end streaming normally, the SDK reports the streaming states in sequence: RTMP_STREAM_PUBLISH_STATE_DISCONNECTING, RTMP_STREAM_PUBLISH_STATE_IDLE.