RTMP_STREAM_PUBLISH_STATE
State of RTMP streaming.
Enumerations
- RTMP_STREAM_PUBLISH_STATE_IDLE
- (0): RTMP streaming 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): RTMP or RTMPS streaming in progress. SDK successfully starts streaming and returns this state.
- RTMP_STREAM_PUBLISH_STATE_RECOVERING
- (3): RTMP or RTMPS streaming is recovering. When the CDN is abnormal or the stream is interrupted, the SDK tries to recover and returns this state.
- If recovery succeeds, returns
RTMP_STREAM_PUBLISH_STATE_RUNNING(2). - If not recovered within 60 seconds or a server error occurs, returns
RTMP_STREAM_PUBLISH_STATE_FAILURE(4). If 60 seconds is too long, you can try reconnecting proactively.
- If recovery succeeds, returns
- RTMP_STREAM_PUBLISH_STATE_FAILURE
- (4): RTMP or RTMPS streaming failed. You can troubleshoot the failure based on the returned error code.
- RTMP_STREAM_PUBLISH_STATE_DISCONNECTING
- (5): SDK is disconnecting from the Agora streaming and CDN servers. When calling stopRtmpStream to stop streaming normally, the SDK reports the states
RTMP_STREAM_PUBLISH_STATE_DISCONNECTINGandRTMP_STREAM_PUBLISH_STATE_IDLEin sequence.