Agora Java API Reference for Android
Public Member Functions | List of all members
agora::rtmp::IRtmpConnectionObserver Class Referenceabstract

#include <NGIAgoraRtmpConnection.h>

Public Member Functions

virtual void onConnected (const RtmpConnectionInfo &connectionInfo)=0
 
virtual void onDisconnected (const RtmpConnectionInfo &connectionInfo)=0
 
virtual void onReconnecting (const RtmpConnectionInfo &connectionInfo)=0
 
virtual void onConnectionLost (const RtmpConnectionInfo &connectionInfo)=0
 
virtual void onConnectionFailure (const RtmpConnectionInfo &connectionInfo, RTMP_CONNECTION_ERROR errCode)=0
 

Detailed Description

The IRtmpConnectionObserver class, which observes the RTMP connection state of the SDK.

Member Function Documentation

◆ onConnected()

virtual void agora::rtmp::IRtmpConnectionObserver::onConnected ( const RtmpConnectionInfo connectionInfo)
pure virtual

Occurs when the connection state between the SDK and the RTMP server changes to STATE_CONNECTED(3).

Parameters
connectionInfoThe information of the current connection: RtmpConnectionInfo.

◆ onDisconnected()

virtual void agora::rtmp::IRtmpConnectionObserver::onDisconnected ( const RtmpConnectionInfo connectionInfo)
pure virtual

Occurs when the connection state between the SDK and the RTMP server changes to STATE_DISCONNECTED(1).

Parameters
connectionInfoThe information of the current connection: RtmpConnectionInfo.

◆ onReconnecting()

virtual void agora::rtmp::IRtmpConnectionObserver::onReconnecting ( const RtmpConnectionInfo connectionInfo)
pure virtual

Occurs when the connection state between the SDK and RTMP server changes to STATE_RECONNECTING(4).

Parameters
connectionInfoThe information of the current connection: RtmpConnectionInfo.

◆ onConnectionLost()

virtual void agora::rtmp::IRtmpConnectionObserver::onConnectionLost ( const RtmpConnectionInfo connectionInfo)
pure virtual

Occurs when the SDK loses connection with the RTMP server.

Parameters
connectionInfoThe information of the current connection: RtmpConnectionInfo.

◆ onConnectionFailure()

virtual void agora::rtmp::IRtmpConnectionObserver::onConnectionFailure ( const RtmpConnectionInfo connectionInfo,
RTMP_CONNECTION_ERROR  errCode 
)
pure virtual

Occurs when the connection state between the SDK and the RTMP server changes to STATE_FAILED(5).

Parameters
connectionInfoThe connection information: RtmpConnectionInfo.
errCodeThe error code for the connection failure.