RtmpStreamPublishState
The state of RTMP streaming.
Enumerations
- rtmpStreamPublishStateIdle
- 0: Streaming has not started or has ended.
- rtmpStreamPublishStateConnecting
- 1: Connecting to the streaming server and CDN server.
- rtmpStreamPublishStateRunning
- 2: Streaming is in progress. This state is returned after successful streaming.
- rtmpStreamPublishStateRecovering
- 3: Recovering the stream. When the CDN encounters an issue or the stream is briefly interrupted, the SDK automatically attempts to recover the stream and returns this state.
- If recovery is successful, it transitions to
rtmpStreamPublishStateRunning(2). - If the server fails or recovery is not successful within 60 seconds, it transitions to
rtmpStreamPublishStateFailure(4). If 60 seconds is too long, you can also manually attempt reconnection.
- If recovery is successful, it transitions to
- rtmpStreamPublishStateFailure
- 4: Streaming failed. After failure, you can troubleshoot the error based on the returned error code.
- rtmpStreamPublishStateDisconnecting
- 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 state as
rtmpStreamPublishStateDisconnecting, thenrtmpStreamPublishStateIdle.