Agora Java API Reference for Android
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
io.agora.rtc2.IRtcEngineEventHandler.RTMP_STREAM_PUBLISH_STATE Enum Reference

Public Member Functions

int getValue ()
 

Static Public Member Functions

static RTMP_STREAM_PUBLISH_STATE fromInt (int v)
 

Public Attributes

 RTMP_STREAM_PUBLISH_STATE_IDLE =(0)
 
 RTMP_STREAM_PUBLISH_STATE_CONNECTING =(1)
 
 RTMP_STREAM_PUBLISH_STATE_RUNNING =(2)
 
 RTMP_STREAM_PUBLISH_STATE_RECOVERING =(3)
 
 RTMP_STREAM_PUBLISH_STATE_FAILURE =(4)
 

Detailed Description

States of the RTMP streaming.

Member Data Documentation

◆ RTMP_STREAM_PUBLISH_STATE_IDLE

io.agora.rtc2.IRtcEngineEventHandler.RTMP_STREAM_PUBLISH_STATE.RTMP_STREAM_PUBLISH_STATE_IDLE =(0)

0: The RTMP streaming has not started or has ended.

This state is also reported after you remove an RTMP address from the CDN by calling removePublishStreamUrl.

◆ RTMP_STREAM_PUBLISH_STATE_CONNECTING

io.agora.rtc2.IRtcEngineEventHandler.RTMP_STREAM_PUBLISH_STATE.RTMP_STREAM_PUBLISH_STATE_CONNECTING =(1)

1: The SDK is connecting to the streaming server and the RTMP server.

This state is reported after you call addPublishStreamUrl.

◆ RTMP_STREAM_PUBLISH_STATE_RUNNING

io.agora.rtc2.IRtcEngineEventHandler.RTMP_STREAM_PUBLISH_STATE.RTMP_STREAM_PUBLISH_STATE_RUNNING =(2)

2: The RTMP streaming publishes. The SDK successfully publishes the RTMP streaming and returns this state.

◆ RTMP_STREAM_PUBLISH_STATE_RECOVERING

io.agora.rtc2.IRtcEngineEventHandler.RTMP_STREAM_PUBLISH_STATE.RTMP_STREAM_PUBLISH_STATE_RECOVERING =(3)

3: The RTMP streaming is recovering. When exceptions occur to the CDN, or the streaming is interrupted, the SDK tries to resume RTMP streaming and reports this state.

  • If the SDK successfully resumes the streaming, RTMP_STREAM_PUBLISH_STATE_RUNNING(2) is reported.
  • If the streaming does not resume within 60 seconds or server errors occur, RTMP_STREAM_PUBLISH_STATE_FAILURE(4) is reported. You can also reconnect to the server by calling removePublishStreamUrl and addPublishStreamUrl.

◆ RTMP_STREAM_PUBLISH_STATE_FAILURE

io.agora.rtc2.IRtcEngineEventHandler.RTMP_STREAM_PUBLISH_STATE.RTMP_STREAM_PUBLISH_STATE_FAILURE =(4)

4: The RTMP streaming fails. See the errCode parameter for the detailed error information. You can also call addPublishStreamUrl to publish the RTMP streaming again.