Menu

API Overview

Last updated: 2023-09-19 15:53:54Download PDF

TUICallKit(UI Component)

<TUICallKit/>: The call component.
<TUICallKitMini/>: The floating call window. If <TUICallKit/>allowedMinimized is true, <TUICallKitMini/> is required.
TUICallKitServer: The call instance, which has the following APIs:
init: Initializes TUICallKit.
call: Makes a one-to-one call.
groupCall: Makes a group call.
setLanguage: Set component language.
setSelfInfo: Set the user nickname and avatar.
setCallingBell: Set custom ringtone for incoming calls.
destroyed: Terminates TUICallKit.

TUICallEngine (No UI)

TUICallEngine is an audio/video call component that does not include UI elements. You can use its APIs to customize your project.
API
Description
Creates a TUICallEngine instance (singleton mode).
Terminates a TUICallEngine instance (singleton mode).
on
Listens for events.
off
Stops listening for events.
login
Logs in.
logout
Logs out.
Sets the alias and profile photo.
call
Makes a one-to-one call.
groupCall
Makes a group call.
accept
Accepts a call.
reject
Rejects a call.
hangup
Ends a call.
Changes the call type.
Starts rendering a remote video.
Stops rendering a remote video.
Starts rendering the local video.
Stops rendering the local video.
Turns the camera on.
Turns the camera off.
Turns the mic on.
Turns the mic off.
Sets whether to mute the mic.
Sets the video quality.
Gets the device list.
Changes to a different camera/mic.

Event Types

TUICallEvent is the callback class of TUICallEngine. You can use it to listen for events.
Event
Description
An internal error occurred.
The SDK is ready.
The current user was removed from the room due to repeated login.
A user accepted the call.
A user agreed to join the call.
A user agreed to leave the call.
A user rejected the call.
The invited user did not answer.
The line is busy.
A remote user turned on/off their camera.
A remote user turned on/off their mic.
A remote user adjusted their call volume.
The invitation list for a group call was updated.
You were invited to a call.
The call was canceled (received by an invitee).
The call ended.
The device list was updated.
The call type changed.