qer-vue2-js-kit v5.0.1
TUICallKit basic demo
English | 简体中文
Overview
This the basic demo shows how to integrate TUICallKit voice/video calling component in your project.
- Environment: Vue2.js + Vite + TypeScript
- With debug panel to quickly experience calling
- Live Demo
Getting Started
Installation
- clone the repository
git clone https://github.com/tencentyun/TUICallKit.git
- enter the demo directory and install dependencies
cd ./TUICallKit/Web/demos/basic-vue2
npm run install:demo
- run the serve
npm run dev
How to use
Open the running page, fill in the parameters in the bottom debug panel (if not currently available, read the hint first).
- SDKAPPID
- SECRETKEY
- UserID: such as
user_A
Click the login button, while the panel is hidden, the login is successful
Click
Login other UserID
, You can login to other users in a new tab.Fill in a different userID at the bottom, such as
user_B
, Click the login button, while the panel is hidden, the login is successfulCalling
- Enter
user_B
intouser_A
's calling list, click to call user_B
will be invited, click accept to start the call
How to build
Copy
Web/src
toWeb/demos/basic-vue2/src/components/
;Enter
Web/demos/basic-vue2
and install dependenciesnpm install trtc-js-sdk tsignaling tuicall-engine-webrtc npm install
Modify the package path: In
src/App.vue
, changeimport { TUICallKit, TUICallKitServer, TUICallKitMini } from "../../..";
toimport { TUICallKit, TUICallKitServer, TUICallKitMini } from "./components/src";
build
npm run build
In the production mode, your website should under
https
protocol.
Read more
How to get SDKAppID and SecretKey?
Activate the service
TUICallKit
is an audio/video call component developed based on two paid PaaS services: IM and TRTC. You can activate the services and enjoy a 60-day free trial as follows:
1. Log in to the IM console and click Create Application. In the pop-up window, enter your application name and click OK.
- Click the application you just created to enter the Basic Configuration page. In the Tencent Real-Time Communication area at the bottom right of the page, click Try now. In the pop-up window, click Activate now to activate a 60-day free trial of TUICallKit.
- On the same page, find and record the SDKAppID and Key(also called SecretKey), which will be used in subsequent steps.
SDKAppID
: The IM application ID, which is used for business isolation; that is, calls with differentSDKAppID
values cannot be interconnected.SecretKey
: The IM application key, which needs to be used together withSDKAppID
to generate the authentication credentialUserSig
for authorized use of IM. It will be used in step 5.