TUICallKit
is Tencent Cloud’s new audio/video call component that comes with UI elements. As an upgraded version of TRTCCalling
, TUICallKit
offers features including group calls and AI noise canceling, supports cross-platform calls, and delivers greater reliability. Before you upgrade to TUICallKit
, please understand the following:TRTCCalling
and TUICallKit
are supported. Just make sure you use the same SDKAppID
.TUICallKit
relies on the audio/video call capability of Tencent Cloud Chat. You can activate a 60-day free trial of the capability in the Chat console: Select the target application to enter the Basic Configuration page, find Tencent Real-Time Communication in the bottom right, and click Try now.TUICallKit
is designed and optimized based on the needs of existing users of TRTCCalling
. You can upgrade to TUICallKit
with just a few steps. The process takes approximately 20 minutes.
You can choose either of two upgrade methods:TRTCCalling
to the SDK and retain your existing UI layer.
Below are the detailed directions:TUICallKit Vue3 UI
TUICallKit Vue3 UI
is an open-source component that comes with UI elements. It can reduce your development time by as much as 90% and allows you to quickly launch an audio/video call application.TRTCCalling 1.x
to TUICallEngine 1.x
.yarn add tuicall-engine-webrtc # Install TUICallEngineyarn add tim-js-sdk@latest trtc-js-sdk@latest tsignaling@latest # Update the dependencies to the latest versionyarn remove trtc-calling-js # Remove TRTCCalling# If you haven’t installed Yarn, execute "npm install -g yarn" first.# If you want to continue using npm to manage the dependencies, replace "yarn add" with "npm install" and replace "yarn remove" with "npm uninstall".
// The old SDKimport TRTCCalling from 'trtc-calling-js';// The new SDKimport { TUICallEngine } from "tuicall-engine-webrtc";
createInstance()
. Below is an example:// The old SDKnew TRTCCalling({ SDKAppID });// The new SDKTUICallEngine.createInstance({ SDKAppID });// TUICallEngine.destroyInstance(); // Call this API to terminate the instance
TRTCCalling.EVENT
to TUICallEvent
. The latter can be imported from tuicall-engine-webrtc
.
We recommend you use the editor to replace it in bulk.// The old SDKtrtcCalling.on(TRTCCalling.EVNET.ERROR, this.handleError);trtcCalling.on(TRTCCalling.EVNET.INVITED, this.handleNewInvitationReceived);trtcCalling.on(TRTCCalling.EVNET.USER_ACCEPT, this.handleUserAccept);...(Other events)// The new SDKimport { TUICallEvent } from "tuicall-engine-webrtc";tuiCallEngine.on(TUICallEvent.ERROR, this.handleError); // “tuiCallEngine” is the new instance name. You can also continue to use “trtcCalling”.tuiCallEngine.on(TUICallEvent.INVITED, this.handleNewInvitationReceived);tuiCallEngine.on(TUICallEvent.USER_ACCEPT, this.handleUserAccept);...(Other events)
TRTCCalling.CALL_TYPE
to TUICallType
. The latter can be imported from tuicall-engine-webrtc
.
We recommend you use the editor to replace it in bulk.// The old SDKthis.TRTCCalling.CALL_TYPE.AUDIO_CALL // Audio callthis.TRTCCalling.CALL_TYPE.VIDEO_CALL // Video call// The new SDKimport { TUICallType } from "tuicall-engine-webrtc";TUICallType.AUDIO_CALL // Audio callTUICallType.VIDEO_CALL // Video call
Description | Old (TRTCCalling) | New (TUICallEngine) | Remarks |
Changes the call type. | trtcCalling.switchToAudioCall() | The API name changed. The parameter specifies the call type to change to. | |
Gets the mic list. | trtcCalling.getMicrophones() | The two APIs are merged into one. The parameter specifies the type of devices to return. | |
Gets the camera list. | trtcCalling.getCameras() | The two APIs are merged into one. The parameter specifies the type of devices to return. | |
Turns on/off the mic | trtcCalling.setMicMute() | The API is split into two APIs. | |
Turns on/off the mic | trtcCalling.setMicMute() | The API is split into two APIs. | |
Sets the username and profile photo. | - | This API is used to set the username and profile photo. | |
Enables/Disables AI noise canceling | - | This is supported since v4.12.1. For details, see the document about AI noise canceling. |
TUICallKit
relies on the audio/video call capability of Chat. If you encounter the error "The package you purchased does not support this ability.", you can go to the Chat console, click the target application to enter the Basic Configuration page, find Tencent Real-Time Communication in the bottom right, and click Try now to activate a 60-day free trial of the capability. If you are officially launching your application, please go to the purchase page to purchase the capability.
Was this page helpful?