RtmpStreamPublishState

Stream publishing state.

Enumerations

RtmpStreamPublishStateIdle
0: Streaming has not started or has ended.
RtmpStreamPublishStateConnecting
1: Connecting to the streaming and CDN servers.
RtmpStreamPublishStateRunning
2: Streaming is ongoing. This state is returned after successful publishing.
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 unsuccessful within 60 seconds, it transitions to RtmpStreamPublishStateFailure(4). If 60 seconds is too long, you can also manually attempt to reconnect.
RtmpStreamPublishStateFailure
4: Streaming failed. After failure, you can troubleshoot using the returned error code.
RtmpStreamPublishStateDisconnecting
5: The SDK is disconnecting from the streaming and CDN servers. When you call stopRtmpStream to end the stream normally, the SDK reports the states RtmpStreamPublishStateDisconnecting and RtmpStreamPublishStateIdle in sequence.