TUICallObserver is the callback class of TUICallEngine. You can use it to listen for events.API | Description |
An error occurred during the call. | |
A call was received. | |
The call was connected. | |
The call ended. | |
The call not connected. | |
A user declined the call. | |
A user didn't respond. | |
A user was busy. | |
A user is invited to join a call. | |
A user joined the call. | |
A user left the call. | |
Whether a user had a video stream. | |
Whether a user had an audio stream. | |
The volume levels of all users. | |
The network quality of all users. | |
The current user was kicked offline. | |
The user sig is expired. |
- (void)onError:(int)code message:(NSString * _Nullable)message;
Parameter | Type | Description |
code | int | The error code. |
message | NSString | The error message. |
- (void)onCallReceived:(NSString *)callId callerId:(NSString *)callerId calleeIdList:(NSArray<NSString *> *)calleeIdList mediaType:(TUICallMediaType)mediaType info:(TUICallObserverExtraInfo *)info;
Parameter | Type | Description |
callId | NSString | Unique ID of this call |
callerId | NSString | Caller ID |
calleeIdList | NSArray | Callee ID List |
mediaType | The call type, which can be video or audio. | |
info | Extended information |
- (void)onCallBegin:(NSString *)callId mediaType:(TUICallMediaType)mediaType info:(TUICallObserverExtraInfo *)info;
Parameter | Type | Description |
callId | NSString | Unique ID of this call |
mediaType | The call type, which can be video or audio. | |
info | Extended information |
- (void)onCallEnd:(NSString *)callId mediaType:(TUICallMediaType)mediaType reason:(TUICallEndReason)reason userId:(NSString *)userId totalTime:(float)totalTime info:(TUICallObserverExtraInfo *)info;
Parameter | Type | Description |
callId | NSString | Unique ID of this call |
mediaType | The call type, which can be video or audio. | |
reason | Call end reason | |
userId | NSString | Ended by user ID |
totalTime | float | The call duration. |
info | Extended information |
- (void)onCallNotConnected:(NSString *)callId mediaType:(TUICallMediaType)mediaType reason:(TUICallEndReason)reaso userId:(NSString *)userId info:(TUICallObserverExtraInfo *)info
Parameter | Type | Description |
callId | NSString | Unique ID of this call |
mediaType | The call type, which can be video or audio. | |
reason | Call not connected reason | |
userId | NSString | Not connected by user ID |
info | Extended information |
- (void)onUserReject:(NSString *)userId;
Parameter | Type | Description |
userId | NSString | The user ID of the invitee who rejected the call. |
- (void)onUserNoResponse:(NSString *)userId;
Parameter | Type | Description |
userId | NSString | The user ID of the invitee who did not answer. |
- (void)onUserLineBusy:(NSString *)userId;
Parameter | Type | Description |
userId | NSString | The user ID of the invitee who is busy. |
- (void)onUserInviting:(NSString *)userId;
Parameter | Type | Description |
userId | NSString | The user ID of the invite. |
- (void)onUserJoin:(NSString *)userId;
Parameter | Type | Description |
userId | NSString | The ID of the user who joined the call. |
- (void)onUserLeave:(NSString *)userId;
Parameter | Type | Description |
userId | NSString | The ID of the user who left the call. |
- (void)onUserVideoAvailable:(NSString *)userId isVideoAvailable:(BOOL)isVideoAvailable;
Parameter | Type | Description |
userId | NSString | The user ID. |
isVideoAvailable | BOOL | Whether the user has video. |
- (void)onUserAudioAvailable:(NSString *)userId isAudioAvailable:(BOOL)isAudioAvailable;
Parameter | Type | Description |
userId | NSString | The user ID. |
isAudioAvailable | BOOL | Whether the user has audio. |
- (void)onUserVoiceVolumeChanged:(NSDictionary <NSString *, NSNumber *> *)volumeMap;
Parameter | Type | Description |
volumeMap | NSDictionary | The volume table, which includes the volume of each user ( userId). Value range: 0-100. |
- (void)onUserNetworkQualityChanged:(NSArray<TUINetworkQualityInfo *> *)networkQualityList;
Parameter | Type | Description |
networkQualityList | NSArray | The current network conditions for all users ( userId). |
init again.- (void)onKickedOffline;
userSig, and then invoke init again.- (void)onUserSigExpired;
- (void)onCallCancelled:(NSString *)callerId;
Parameter | Type | Description |
callerId | NSString | The user ID of the inviter. |
- (void)onCallMediaTypeChanged:(TUICallMediaType)oldCallMediaType newCallMediaType:(TUICallMediaType)newCallMediaType;
Parameter | Type | Description |
oldCallMediaType | The call type before the change. | |
newCallMediaType | The call type after the change. |
Feedback