RTMP_STREAM_PUBLISH_STATE
States of the Media Push.
Enumerator
- RTMP_STREAM_PUBLISH_STATE_IDLE
- 0: The Media Push has not started or has ended.
- RTMP_STREAM_PUBLISH_STATE_CONNECTING
- 1: The SDK is connecting to Agora's streaming server and the CDN server.
- RTMP_STREAM_PUBLISH_STATE_RUNNING
- 2: The RTMP or RTMPS streaming publishes. The SDK successfully publishes the RTMP or RTMPS streaming and returns this state.
- RTMP_STREAM_PUBLISH_STATE_RECOVERING
-
3: The RTMP or RTMPS streaming is recovering. When exceptions occur to the CDN, or the streaming is interrupted, the SDK tries to resume RTMP or RTMPS streaming and returns this state.
- If the SDK successfully resumes the streaming, RTMP_STREAM_PUBLISH_STATE_RUNNING(2) returns.
- If the streaming does not resume within 60 seconds or server errors occur, RTMP_STREAM_PUBLISH_STATE_FAILURE(4) returns. You can also reconnect to the server by calling the stopRtmpStream method.
- RTMP_STREAM_PUBLISH_STATE_FAILURE
- 4: The RTMP or RTMPS streaming fails. See the errCode parameter for the detailed error information.
- RTMP_STREAM_PUBLISH_STATE_DISCONNECTING
- 5: The SDK is disconnecting from the Agora streaming server and CDN. When you call stopRtmpStream to stop the streaming normally, the SDK reports the streaming state as RTMP_STREAM_PUBLISH_STATE_DISCONNECTING and RTMP_STREAM_PUBLISH_STATE_IDLE in sequence.