製品アップデート情報
Tencent Cloudオーディオビデオ端末SDKの再生アップグレードおよび承認チェック追加に関するお知らせ
TRTCアプリケーションのサブスクリプションパッケージサービスのリリースに関する説明について

yarn add @tencentcloud/call-uikit-react-native
SDKAppID and SecretKey.cp -r node_modules/@tencentcloud/call-uikit-react-native/src/debug ./src
xcopy node_modules\\@tencentcloud\\call-uikit-react\\src\\debug .\\src\\debug /i /e
App.tsx. This process performs the login for the TUI component. This step is critical; you can only use the features provided by TUICallKit after a successful login.import { TUICallKit, MediaType } from '@tencentcloud/call-uikit-react-native';import * as GenerateTestUserSig from "./debug/GenerateTestUserSig-es";const handleLogin = async () => {try {const sdkAppID = 0; // Replace with the SDKAppID obtained from the consoleconst secretKey = ''; // Replace with the SecretKey obtained from the consoleconst userId = 'jack' // Replace with your UserIdconst { userSig } = genTestUserSig({SDKAppID: sdkAppID,SecretKey: secretKey,userID: loginUserID,});await TUICallKit.login({sdkAppId: sdkAppID,userId: loginUserID,userSig,});console.log('login success');} catch (error) {console.error('login fail:', error);}};
Parameter | Type | Description |
userId | String | Only allows a combination of uppercase and lowercase letters (a-z A-Z), numbers (0-9), hyphens, and underscores. |
SDKAppId | int | |
SecretKey | String | |
userSig | String | A security signature used to authenticate user login, verify user authenticity, and prevent malicious attackers from stealing your cloud service usage rights. |
GenerateTestUserSig.genTestSig function to generate userSig. In this method, the secretKey is very easy to decompile and reverse engineer. Once your key is leaked, attackers can steal your Tencent Cloud traffic.setSelfInfo interface:import { TUICallKit, MediaType } from '@tencentcloud/call-uikit-react-native';const setSelfInfo = () => {const nickName = 'mick'; // Nickname to setconst avatar = 'https:/****/user_avatar.png'; // profile photo URL to setTUICallKit.setSelfInfo(nickName,avatar,() => {console.log('setSelfInfo success.');},(errCode, errMsg) => {console.error('setSelfInfo fail:', errCode, errMsg);});};
Parameter | Type | Description |
nickName | String | The nickname to be set for the target user. |
avatar | String | The avatar URL to be set for the target user. |
calls function and specifying the call type and the callee's User ID list. The calls interface supports both one-to-one and group calls. A one-to-one call is initiated when userIDList contains a single User ID; a group call is initiated when userIDList contains multiple User IDs.import { TUICallKit, MediaType } from '@tencentcloud/call-uikit-react-native';const calls = async () => {try {const userIdList: string[] = ['lee', 'jane']; // called listconst mediaType = MediaType.Audio // call typeawait TUICallKit.calls({userIdList: userIdList,mediaType,});console.log('calls success');} catch (error) {console.error('calls fail:', error);}};
Parameter | Type | Description |
userIdList | Array<String> | The list of User IDs for the target users. |
mediaType | Media type of the call, such as video call, voice call. MediaType.Audio :voice call. MediaType.Video :video call. | |
callParams | Call extension parameters, such as room number, call invitation timeout, offline push custom content. |
setLanguage method.import { Language } from '@tencentcloud/call-uikit-react-native';TUICallKit.setLanguage(Language.EN);
Parameter | Type | Description |
language | string | Language.ZH_CN:Simplified Chinese. Language.ZH_TW:Traditional Chinese. Language.EN:English. Language.AR:Arabic. |
setCallingBell interface to set the incoming call ringtone received by the callee.import { TUICallKit, MediaType } from '@tencentcloud/call-uikit-react-native';const setCallingBell = () => {const filePath = 'path/to/your/bell.mp3'; // File path of the ringtoneTUICallKit.setCallingBell(filePath);};
Parameter | Type | Description |
filePath | String | The path to the ringtone file. |
enableMuteMode.import { TUICallKit, MediaType } from '@tencentcloud/call-uikit-react-native';TUICallKit.enableMuteMode(true);
info_rtc@tencent.com.フィードバック