Agora RTC Objective-C API Reference
Refactor
|
Public Member Functions | |
virtual void | onConnected (const TConnectionInfo &connectionInfo, CONNECTION_CHANGED_REASON_TYPE reason)=0 |
virtual void | onDisconnected (const TConnectionInfo &connectionInfo, CONNECTION_CHANGED_REASON_TYPE reason)=0 |
virtual void | onConnecting (const TConnectionInfo &connectionInfo, CONNECTION_CHANGED_REASON_TYPE reason)=0 |
virtual void | onReconnecting (const TConnectionInfo &connectionInfo, CONNECTION_CHANGED_REASON_TYPE reason)=0 |
virtual void | onConnectionLost (const TConnectionInfo &connectionInfo)=0 |
virtual void | onLastmileQuality (const QUALITY_TYPE quality)=0 |
virtual void | onLastmileProbeResult (const LastmileProbeResult &result)=0 |
virtual void | onTokenPrivilegeWillExpire (const char *token)=0 |
virtual void | onTokenPrivilegeDidExpire ()=0 |
virtual void | onConnectionFailure (const TConnectionInfo &connectionInfo, CONNECTION_CHANGED_REASON_TYPE reason)=0 |
virtual void | onUserJoined (user_id_t userId)=0 |
virtual void | onUserLeft (user_id_t userId, USER_OFFLINE_REASON_TYPE reason)=0 |
virtual void | onTransportStats (const RtcStats &stats)=0 |
virtual void | onChangeRoleSuccess (CLIENT_ROLE_TYPE oldRole, CLIENT_ROLE_TYPE newRole) |
virtual void | onChangeRoleFailure (CLIENT_ROLE_CHANGE_FAILED_REASON reason, CLIENT_ROLE_TYPE currentRole) |
virtual void | onUserNetworkQuality (user_id_t userId, QUALITY_TYPE txQuality, QUALITY_TYPE rxQuality) |
virtual void | onNetworkTypeChanged (NETWORK_TYPE type) |
virtual void | onApiCallExecuted (int err, const char *api, const char *result) |
virtual void | onContentInspectResult (media::CONTENT_INSPECT_RESULT result) |
virtual void | onSnapshotTaken (uid_t uid, const char *filePath, int width, int height, int errCode) |
virtual void | onError (ERROR_CODE_TYPE error, const char *msg) |
virtual void | onChannelMediaRelayStateChanged (int state, int code)=0 |
virtual void | onLocalUserRegistered (uid_t uid, const char *userAccount) |
virtual void | onUserAccountUpdated (uid_t uid, const char *userAccount) |
virtual void | onStreamMessageError (user_id_t userId, int streamId, int code, int missed, int cached) |
virtual void | onEncryptionError (ENCRYPTION_ERROR_TYPE errorType) |
virtual void | onUploadLogResult (const char *requestId, bool success, UPLOAD_ERROR_REASON reason) |
virtual void | onWlAccMessage (WLACC_MESSAGE_REASON reason, WLACC_SUGGEST_ACTION action, const char *wlAccMsg) |
virtual void | onWlAccStats (WlAccStats currentStats, WlAccStats averageStats) |
The IRtcConnectionObserver class, which observes the connection state of the SDK.
|
inlinevirtual |
|
pure virtual |
Occurs when the connection state between the SDK and the Agora channel changes to CONNECTION_STATE_CONNECTED(3)
.
connectionInfo | The information of the connection. See TConnectionInfo. |
reason | The reason of the connection state change. See CONNECTION_CHANGED_REASON_TYPE. |
|
pure virtual |
Occurs when the connection state between the SDK and the Agora channel changes to CONNECTION_STATE_DISCONNECTED(1)
.
connectionInfo | The information of the connection. See TConnectionInfo. |
reason | The reason of the connection state change. See CONNECTION_CHANGED_REASON_TYPE. |
|
pure virtual |
Occurs when the connection state between the SDK and the Agora channel changes to CONNECTION_STATE_CONNECTING(2)
.
connectionInfo | The information of the connection. See TConnectionInfo. |
reason | The reason of the connection state change. See CONNECTION_CHANGED_REASON_TYPE. |
|
pure virtual |
Occurs when the connection state between the SDK and the Agora channel changes to CONNECTION_STATE_RECONNECTING(4)
.
connectionInfo | The information of the connection. See TConnectionInfo. |
reason | The reason of the connection state change. See CONNECTION_CHANGED_REASON_TYPE. |
|
pure virtual |
|
pure virtual |
Occurs when the SDK loses connection with the Agora channel.
connectionInfo | The information of the connection. See TConnectionInfo. |
|
pure virtual |
Reports the quality of the last-mile network.
The SDK triggers this callback within two seconds after the app calls startLastmileProbeTest.
quality | Quality of the last-mile network: QUALITY_TYPE. |
|
pure virtual |
Reports the result of the last-mile network probe test.
The SDK triggers this callback within 30 seconds after the app calls startLastmileProbeTest.
result | The result of the last-mile network probe test: LastmileProbeResult. |
|
pure virtual |
Occurs when the token expires in 30 seconds.
The SDK triggers this callback to remind the app to get a new token before the token privilege expires.
Upon receiving this callback, you must generate a new token on your server and call renewToken to pass the new token to the SDK.
token | The pointer to the token that expires in 30 seconds. |
|
pure virtual |
Occurs when the token has expired.
Upon receiving this callback, you must generate a new token on your server and call renewToken to pass the new token to the SDK.
|
pure virtual |
Occurs when the connection state between the SDK and the Agora channel changes to CONNECTION_STATE_FAILED(5)
.
connectionInfo | The connection information: TConnectionInfo. |
reason | The reason of the connection state change: CONNECTION_CHANGED_REASON_TYPE. |
|
pure virtual |
Occurs when a remote user joins the channel.
You can get the ID of the remote user in this callback.
userId | The ID of the remote user who joins the channel. |
|
pure virtual |
Occurs when a remote user leaves the channel.
You can know why the user leaves the channel through the reason
parameter.
userId | The ID of the user who leaves the channel. |
reason | The reason why the remote user leaves the channel: USER_OFFLINE_REASON_TYPE. |
|
pure virtual |
Reports the transport statistics of the connection.
The SDK triggers this callback once every two seconds when the connection state is CONNECTION_STATE_CONNECTED
.
stats | The pointer to RtcStats. |
|
inlinevirtual |
Occurs when the role of the local user changes.
oldRole | The previous role of the local user: CLIENT_ROLE_TYPE. |
newRole | The current role of the local user: CLIENT_ROLE_TYPE. |
|
inlinevirtual |
Occurs when the local user fails to change the user role.
|
inlinevirtual |
Reports the network quality of each user.
The SDK triggers this callback once every two seconds to report the uplink and downlink network conditions of each user in the channel, including the local user.
userId | The ID of the user. If userId is empty, this callback reports the network quality of the local user. |
txQuality | The uplink network quality: QUALITY_TYPE. |
rxQuality | The downlink network quality: QUALITY_TYPE. |
|
inlinevirtual |
Occurs when the network type is changed.
type | The current network type. See NETWORK_TYPE. |
|
inlinevirtual |
Occurs when an API method is executed.
err | The error code that the SDK reports when the method call fails. If the SDK reports 0, the method call succeeds. |
api | The API method that is executed. |
result | The result of the method call. |
|
inlinevirtual |
Reports result of Content Inspect
|
inlinevirtual |
snapshot taken callback
Occurs when takeSnapshot API result is obtained
channel | channel name |
uid | user id |
filePath | image is saveed file path |
width | image width |
height | image height |
errCode | 0 is ok negative is error |
|
inlinevirtual |
Reports the error code and error message.
error | The error code: ERROR_CODE_TYPE. |
msg | The error message. |
|
pure virtual |
Occurs when the state of the channel media relay changes.
state | The state code:
|
code | The error code:
|
|
inlinevirtual |
Occurs when the local user successfully registers a user account by calling the joinChannelWithUserAccount method.This callback reports the user ID and user account of the local user.
uid | The ID of the local user. |
userAccount | The user account of the local user. |
|
inlinevirtual |
Technical Preview, please do not depend on this event.
|
inlinevirtual |
Reports the error that occurs when receiving data stream messages.
userId | The ID of the user sending the data stream. |
streamId | the ID of the sent data stream, returned in the createDataStream method. |
code | The error code. |
missed | The number of lost messages. |
cached | The number of incoming cached messages when the data stream is interrupted. |
|
inlinevirtual |
Reports the error type of encryption.
type | See ENCRYPTION_ERROR_TYPE. |
|
inlinevirtual |
Reports the user log upload result
requestId | RequestId of the upload |
success | Is upload success |
reason | Reason of the upload, 0: OK, 1 Network Error, 2 Server Error. |
|
inlinevirtual |
Occurs when the WIFI message need be sent to the user.
reason | The reason of notifying the user of a message. |
action | Suggest an action for the user. |
wlAccMsg | The message content of notifying the user. |
|
inlinevirtual |
Occurs when SDK statistics wifi acceleration optimization effect.
currentStats | Instantaneous value of optimization effect. |
averageStats | Average value of cumulative optimization effect. |