TUICallEngine
is an audio/video call component that does not include UI elements. If TUICallKit
does not meet your requirements, you can use the APIs of TUICallEngine
to customize your project.API | Description |
Authenticates the basic audio/video call capabilities. | |
| |
The destructor function, which releases resources used by TUICallEngine. | |
Registers an event listener. | |
Unregisters an event listener. | |
Makes a one-to-one call. | |
Makes a group call. | |
Accepts a call. | |
Rejects a call. | |
Ends a call. | |
Ignores a call. | |
Invites users to the current group call. | |
Joins a group call. | |
Changes the call type, for example, from video call to audio call. | |
Subscribes to the video stream of a remote user. | |
Unsubscribes from the video stream of a remote user. | |
Turns the camera on. | |
Turns the camera off. | |
Switches between the front and rear cameras. | |
Turns the mic on. | |
Turns the mic off. | |
Selects the audio playback device (receiver or speaker). | |
Sets the alias and profile photo. | |
Sets whether to enable multi-device login for TUICallEngine (supported by the premium package). | |
Set the rendering mode of video image. | |
Set the encoding parameters of video encoder. | |
Query call record. | |
Delete call record. | |
Set beauty level, support turning off default beauty. |
TUICallEngine
. Call it to authenticate the call service and perform other required actions before you call other APIs.Future<TUIResult> init(int sdkAppID, String userId, String userSig)
Future<TUIResult> unInit()
TUICallObserver
events.Future<void> addObserver(TUICallObserver observer)
Future<void> removeObserver(TUICallObserver observer)
Future<TUIResult> call(String userId, TUICallMediaType mediaType, TUICallParams params)
Parameter | Type | Description |
userId | String | The target user ID. |
mediaType | The call type, which can be video or audio. | |
params | An additional parameter, such as roomID, call timeout, offline push info, etc |
Future<TUIResult> groupCall(String groupId, List<String> userIdList, TUICallMediaType mediaType, TUICallParams params)
Parameter | Type | Description |
groupId | String | The group ID. |
userIdList | List<String> | The target user IDs. |
mediaType | The call type, which can be video or audio. | |
params | An additional parameter. such as roomID, call timeout, offline push info, etc |
onCallReceived()
callback, you can call this API to accept the call.Future<TUIResult> accept()
onCallReceived()
callback, you can call this API to reject the call.Future<TUIResult> reject()
onCallReceived()
, you can call this API to ignore the call. The caller will receive the onUserLineBusy
callback.Future<TUIResult> ignore()
Future<TUIResult> hangup()
Future<void> iniviteUser(List<String> userIdList, TUICallParams params, TUIValueCallback callback)
Parameter | Type | Description |
userIdList | List<String> | The target user IDs. |
params | An additional parameter. such as roomID, call timeout, offline push info, etc. |
Future<TUIResult> joinInGroupCall(TUIRoomId roomId, String groupId, TUICallMediaType mediaType)
Parameter | Type | Description |
roomId | The room ID. | |
groupId | String | The group ID. |
mediaType | The call type, which can be video or audio. |
Future<void> switchCallMediaType(TUICallMediaType mediaType)
Parameter | Type | Description |
mediaType | The call type, which can be video or audio. |
Future<void> startRemoteView(String userId, intviewId)
Parameter | Type | Description |
userId | String | The target user ID. |
intviewId | int | The ID of the widget in the video rendering screen |
Future<void> stopRemoteView(String userId)
Parameter | Type | Description |
userId | String | The target user ID. |
Future<TUIResult> openCamera(TUICamera camera, int? viewId)
Parameter | Type | Description |
camera | The front or rear camera. | |
viewId | int | The ID of the widget in the video rendering screen |
Future<void> closeCamera()
Future<void> switchCamera(TUICamera camera)
Parameter | Type | Description |
camera | The front or rear camera. |
Future<TUIResult> openMicrophone()
Future<void> closeMicrophone()
Future<void> selectAudioPlaybackDevice(TUIAudioPlaybackDevice device)
Parameter | Type | Description |
device | The speaker or receiver. |
Future<TUIResult> setSelfInfo(String nickname, String avatar)
TUICallEngine
(supported by the premium package).Future<TUIResult> enableMultiDeviceAbility(bool enable)
Future<TUIResult> setVideoRenderParams(String userId, VideoRenderParams params)
Parameter | Type | Description |
userId | String | The target user ID. |
params | Video render parameters. |
Future<TUIResult> setVideoEncoderParams(VideoEncoderParams params)
Parameter | Type | Description |
params | Video encoding parameters |
Future<void> queryRecentCalls(TUICallRecentCallsFilter filter, TUIValueCallback callback)
Parameter | Type | Description |
filter | Filter condition |
Future<void> deleteRecordCalls(List<String> callIdList, TUIValueCallback callback)
Parameter | Type | Description |
callIdList | List<String> | List of IDs of records to be deleted. |
Future<TUIResult> setBeautyLevel(double level)
Parameter | Type | Description |
level | double | Beauty level, range 0.0 to 9.0. |
Was this page helpful?