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 canceled. | |
The call was connected. | |
The call ended. | |
The call type changed. | |
A user declined the call. | |
A user didn't respond. | |
A user was busy. | |
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 *)callerId calleeIdList:(NSArray<NSString *> *)calleeIdList groupId:(NSString * _Nullable)groupId callMediaType:(TUICallMediaType)callMediaType userData:(NSString * _Nullable)userData
Parameter | Type | Description |
callerId | NSString | The user ID of the inviter. |
calleeIdList | NSArray | The invitee list. |
groupId | NSString | The group ID. |
callMediaType | The call type, which can be video or audio. | |
userData | NSString | User-added extended fields.,Please refer to: |
- (void)onCallCancelled:(NSString *)callerId;
Parameter | Type | Description |
callerId | NSString | The user ID of the inviter. |
- (void)onCallBegin:(TUIRoomId *)roomId callMediaType:(TUICallMediaType)callMediaType callRole:(TUICallRole)callRole;
Parameter | Type | Description |
roomId | The room ID. | |
callMediaType | The call type, which can be video or audio. | |
callRole | The role, which can be caller or callee. |
- (void)onCallEnd:(TUIRoomId *)roomId callMediaType:(TUICallMediaType)callMediaType callRole:(TUICallRole)callRole totalTime:(float)totalTime;
Parameter | Type | Description |
roomId | The room ID. | |
callMediaType | The call type, which can be video or audio. | |
callRole | The role, which can be caller or callee. | |
totalTime | float | The call duration. |
- (void)onCallMediaTypeChanged:(TUICallMediaType)oldCallMediaType newCallMediaType:(TUICallMediaType)newCallMediaType;
Parameter | Type | Description |
oldCallMediaType | The call type before the change. | |
newCallMediaType | The call type after the change. |
- (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)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)onUserAudioAvailable:(NSString *)userId isAudioAvailable:(BOOL)isAudioAvailable;
Parameter | Type | Description |
userId | NSString | The user ID. |
isAudioAvailable | BOOL | Whether the user has audio. |
- (void)onUserVideoAvailable:(NSString *)userId isVideoAvailable:(BOOL)isVideoAvailable;
Parameter | Type | Description |
userId | NSString | The user ID. |
isVideoAvailable | BOOL | Whether the user has video. |
- (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;
Was this page helpful?