Inherits <NSObjectNSObject>.
Protocol providing the AgoraLiveKit class with callbacks.
◆ liveKit:didOccurWarning:
- (void) liveKit: |
|
(AgoraLiveKit *_Nonnull) |
kit |
didOccurWarning: |
|
(AgoraWarningCode) |
warningCode |
|
|
| |
|
optional |
A warning occurred during SDK runtime.
The app can ignore the warning, and the SDK tries to resume automatically.
- Parameters
-
◆ liveKit:didOccurError:
- (void) liveKit: |
|
(AgoraLiveKit *_Nonnull) |
kit |
didOccurError: |
|
(AgoraErrorCode) |
errorCode |
|
|
| |
|
optional |
An error occurred during SDK runtime.
The SDK cannot resume a normal state, and the app needs to handle it.
- Parameters
-
◆ liveKit:didJoinChannel:withUid:elapsed:
- (void) liveKit: |
|
(AgoraLiveKit *_Nonnull) |
kit |
didJoinChannel: |
|
(NSString *_Nonnull) |
channel |
withUid: |
|
(NSUInteger) |
uid |
elapsed: |
|
(NSInteger) |
elapsed |
|
|
| |
|
optional |
A user joined the channel.
- Parameters
-
kit | AgoraLiveKit |
channel | Channel name |
uid | Local user ID |
elapsed | Time elapsed (ms) from the beginning of the session |
◆ liveKitDidLeaveChannel:
- (void) liveKitDidLeaveChannel: |
|
(AgoraLiveKit *_Nonnull) |
kit |
|
|
optional |
The statistics of the call when leaving a channel
- Parameters
-
◆ liveKit:didRejoinChannel:withUid:elapsed:
- (void) liveKit: |
|
(AgoraLiveKit *_Nonnull) |
kit |
didRejoinChannel: |
|
(NSString *_Nonnull) |
channel |
withUid: |
|
(NSUInteger) |
uid |
elapsed: |
|
(NSInteger) |
elapsed |
|
|
| |
|
optional |
A user rejoined the channel
- Parameters
-
kit | AgoraLiveKit |
channel | Channel name |
uid | User id |
elapsed | Time elapsed (ms) from the beginning of the session |
◆ liveKitRequestToken:
Generates a new Token.
When the Token is enabled, and the specified Token is invalid or has expired, this function will be called. The app should generate a new Token and call renewToken to refresh the key.
NOTE: To be compatible with previous versions, AgoraErrorCodeTokenExpired = 109 and AgoraErrorCodeInvalidToken = 110 are also reported through the [didOccurError](liveKit:didOccurError:) callback. You should move the renew token logic into this callback.
- Parameters
-
◆ liveKit:tokenPrivilegeWillExpire:
- (void) liveKit: |
|
(AgoraLiveKit *_Nonnull) |
kit |
tokenPrivilegeWillExpire: |
|
(NSString *_Nonnull) |
token |
|
|
| |
|
optional |
The token privilege will expire.
If the Token you specified when calling [joinChannelByToken](joinChannelByToken:channelId:info:uid:joinSuccess:) expires, you will become offline. This callback is triggered 30 seconds before the Token expires to remind the app to renew the Token.
Upon receiving this callback, the user needs to generate a new Token on your server and call renewToken to pass the new Token on to the SDK.
- Parameters
-
kit | AgoraLiveKit |
token | The Token that will expire in 30 seconds. |
◆ liveKit:reportLiveStats:
The statistics of the RTC AgoraLiveKit status every two seconds.
- Parameters
-
kit | AgoraLiveKit |
stats | Statistics of the RTC status, including the duration, sent bytes, and received bytes |
◆ liveKitConnectionDidInterrupted:
- (void) liveKitConnectionDidInterrupted: |
|
(AgoraLiveKit *_Nonnull) |
kit |
|
|
optional |
The SDK disconnected from the server.
This event is reported when the SDK loses connection to the server. The SDK tries to automatically reconnect with the server until the app calls [leaveChannel]([AgoraLiveKit leaveChannel]).
- Parameters
-
◆ liveKitConnectionDidLost:
- (void) liveKitConnectionDidLost: |
|
(AgoraLiveKit *_Nonnull) |
kit |
|
|
optional |
The connection to the server is lost.
This event is reported after the connection to the server is interrupted and the reconnection time has exceeded (10 seconds by default). The SDK tries to automatically reconnect with the server until the app calls [leaveChannel]([AgoraLiveKit leaveChannel]).
- Parameters
-
◆ liveKit:networkQuality:txQuality:rxQuality:
The network quality of the local user.
- Parameters
-
kit | AgoraLiveKit |
uid | User ID |
txQuality | Network transmission quality: AgoraNetworkQuality |
rxQuality | Network receiving quality: AgoraNetworkQuality |