2.9.0 • Published 5 months ago
@tencentcloud/call-uikit-react-native v2.9.0
TUICallKit is a UIKit component for audio and video calls.
Introduction
TUICallKit is a UIKit component for audio and video calls developed by Tencent Cloud. By integrating this component, you can easily add video calling functionality to your app with just a few lines of code.
- Online Demo
- TUICallKit Github Demo
- We offer TUICallKit for Web, Android, iOS, MiniProgram, Flutter, explore more in trtc.io.
Install
yarn add @tencentcloud/call-uikit-react-native
Activate Service
copy the
debug
directory to your project directorysrc/debug
, it is necessary when generating userSig locally.# macOS cp -r node_modules/@tencentcloud/call-uikit-react-native/src/debug ./src # windows xcopy node_modules\@tencentcloud\call-uikit-react\src\debug .\src\debug /i /e
Go to the Activate Service page and get the
SDKAppID and SDKSecretKey
, then fill them in theGenerateTestUserSig-es.js
file.
Usage
import { TUICallKit, MediaType, TUICallEvent } from "@tencentcloud/call-uikit-react-native";
import { genTestUserSig } from '../../debug/GenerateTestUserSig-es';
TUICallKit.login
const handleLogin = () => {
const userID = 'Alice'
const { SDKAppID, userSig } = genTestUserSig({ userID });
TUICallKit.login(
{
sdkAppId: SDKAppID,
userId: userID,
userSig,
},
(res) => {
console.log('login success', res);
},
(errCode, errMsg) => {
console.log('login error', errCode, errMsg);
}
);
};
TUICallKit.call
const call = () => {
TUICallKit.call(
{
userId: 'denny',
mediaType: MediaType.Video,
},
() => {
console.log('call success');
},
() => {
console.log('call error');
}
);
};
TUICallKit.groupCall
const groupCall = () => {
TUICallKit.groupCall(
{
userIdList: ['mike', 'denny'],
mediaType: MediaType.Video,
groupId: 'xxx',
},
(res) => {
console.log('groupCall success', res);
},
(errCode, errMsg) => {
console.log('groupCall error', errCode, errMsg);
}
);
};
FAQs
2.9.0
5 months ago
2.0.3
6 months ago
2.0.4
5 months ago
2.0.2
7 months ago
2.0.1-beta.2
7 months ago
2.0.1-beta.1
7 months ago
2.0.1
7 months ago
2.0.0
7 months ago
1.0.0
8 months ago
0.1.0
8 months ago
0.1.0-beta.3
8 months ago
0.1.0-beta.2
8 months ago
0.1.0-beta.1
8 months ago
0.1.0-beta.0
8 months ago