TUICallKit
component to build a video call application with ready-made UI.TUICallKit
component using npm. In case you need to scale your business in the future, we recommend you copy TUICallKit
to the src/components/
directory of your project.# macOSyarn add @tencentcloud/call-uikit-vue # If you haven’t installed Yarn, execute `npm install -g yarn` first.mkdir -p ./src/components/TUICallKit/Web && cp -r ./node_modules/@tencentcloud/call-uikit-vue/* ./src/components/TUICallKit/Web# Windowsyarn add @tencentcloud/call-uikit-vue # If you haven’t installed Yarn, execute `npm install -g yarn` first.xcopy .\\node_modules\\@tencentcloud\\call-uikit-vue .\\src\\components\\TUICallKit\\Web /i /e
TUICallKit
source code from GitHub and copy the TUICallKit/Web
folder to the src/components
folder of your project.cd ./src/components/TUICallKit/Webyarn # If you haven’t installed Yarn, execute `npm install -g yarn` first.
TUICallKit
TUICallKit
on a page to show the call view.<script lang="ts" setup>import { TUICallKit } from "./components/TUICallKit/Web";</script><template><TUICallKit /></template>
TUICallKit
as a plugin. If you are not already using a TUIKit component, skip this.import { TUICallKit } from './components/TUICallKit/Web';TUIKit.use(TUICallKit);
import { TUICallKitServer } from './components/TUICallKit/Web';TUICallKitServer.init({ SDKAppID, userID, userSig });
SDKAppID
and SecretKey
, see step 1.
As a temporary method, you can use genTestUserSig(userID)
in GenerateTestUserSig.js
to generate userSig
:import * as GenerateTestUserSig from "./components/TUICallKit/Web/demos/basic/public/debug/GenerateTestUserSig.js";const { userSig } = GenerateTestUserSig.genTestUserSig(userID, SDKAppID, SecretKey);
UserSig
is to configure a SECRETKEY
in the client code. In this method, the SECRETKEY
is vulnerable to decompilation and reverse engineering. Once your SECRETKEY
is disclosed, attackers can steal your Tencent Cloud traffic. Therefore, this method is only suitable for locally running and debugging a demo project. The correct UserSig
distribution method is to integrate the calculation code of UserSig
into your server and provide an application-oriented API. When UserSig
is needed, your application can send a request to your server for a dynamic UserSig
. For more information, see Generating UserSig.import { TUICallKitServer } from './components/TUICallKit/Web';TUICallKitServer.call({ userID: "123", type: 2 }); // One-to-one callTUICallKitServer.groupCall({ userIDList: ["xxx"], groupID: "xxx", type: 2 }); // Group call
TUICallKit
offers the beforeCalling
and afterCalling
callbacks to send you notifications about call status.beforeCalling
: Returned before a call.afterCalling
: Returned after a call.<TUICallKit />
component (as shown in the demo).function beforeCalling() {console.log("This is executed before a call.");}function afterCalling() {console.log("This is executed after a call.");}
<TUICallKit :beforeCalling="beforeCalling" :afterCalling="afterCalling"/>
UserSig
distribution method is to integrate the calculation code of UserSig
into your server and provide a project-oriented API. When UserSig
is needed, your project can send a request to your server for a dynamic UserSig
. For more information, see Generating UserSig.lib-generate-test-usersig.min.js
in index.html
.// index.html<script src="./src/components/TUICallKit/Web/demos/basic/public/debug/lib-generate-test-usersig.min.js"> </script>
GenerateTestUserSig.js
.// import * as LibGenerateTestUserSig from './lib-generate-test-usersig.min.js'
TUICallKit
by mainstream browsers:OS | Browser | Minimum Browser Version Requirement |
macOS | Safari (desktop) | 11+ |
macOS | Chrome (desktop) | 56+ |
macOS | Firefox (desktop) | 56+ |
macOS | Edge (desktop) | 80+ |
Windows | Chrome (desktop) | 56+ |
Windows | QQ Browser (desktop, WebKit core) | 10.4+ |
Windows | Firefox (desktop) | 56+ |
Windows | Edge (desktop) | 80+ |
TUICallKit
to your firewall’s allowlist.Scenario | Protocol | Receive (Playback) | Send (Publish) | Share Screen | Remarks |
Production | HTTPS | Supported | Supported | Supported | Recommended |
Production | HTTP | Supported | Not supported | Not supported | - |
Local development | http://localhost | Supported | Supported | Supported | Recommended |
Local development | http://127.0.0.1 | Supported | Supported | Supported | - |
Local development | http://[local IP] | Supported | Not supported | Not supported | - |
Local development | file:/// | Supported | Supported | Supported | - |
Was this page helpful?