### Install Dependencies for Vue2 Example Source: https://cloud.tencent.com/document/product/269/107476 Navigate to the Vue2 example directory and run this command to install all necessary npm packages for the Vue2 Electron application. ```bash cd ./TUIRoomKit/Electron/example/vue2 npm install ``` -------------------------------- ### Install Dependencies for Vue3 Example Source: https://cloud.tencent.com/document/product/269/107476 Navigate to the Vue3 example directory and run this command to install all necessary npm packages for the Vue3 Electron application. ```bash cd ./TUIRoomKit/Electron/example/vue3 npm install ``` -------------------------------- ### Bootstrap and Start Upload Server Source: https://cloud.tencent.com/document/product/269/125543 Install dependencies and start the upload server for the live streaming demo. ```bash npm run upload-server:bootstrap npm run upload-server:standalone ``` -------------------------------- ### Install Dependencies and Run Vue3 IM Demo Source: https://cloud.tencent.com/document/product/269/123276 Navigate to the demo directory, install project dependencies using npm, and start the development server. ```bash cd TUIKit_Vue3/demos/rtcube-vite-vue3 npm install npm run dev ``` -------------------------------- ### Install Flutter Dependencies Source: https://cloud.tencent.com/document/product/269/125541 Navigate to the example project's directory and run 'flutter pub get' to install all necessary Flutter dependencies defined in pubspec.yaml. ```bash # example 工程 pubspec.yaml 文件位于 TUIKit_Flutter/application 目录下 cd TUIKit_Flutter/application # 安装依赖 flutter pub get ``` -------------------------------- ### Start OpenClaw Onboarding Process Source: https://cloud.tencent.com/document/product/269/128326 Initiate the OpenClaw onboarding process to configure channels and AI models. This command starts an interactive setup. ```bash openclaw onboard ``` -------------------------------- ### BattleStore Initialization and Listener Setup Source: https://cloud.tencent.com/document/product/269/128845 Demonstrates how to create a BattleStore instance, define listeners for battle state changes, and subscribe to these changes. ```APIDOC ## Initialization and Listener Setup ### Description This section shows how to initialize the `BattleStore` and set up listeners to receive real-time updates on battle information and participants. ### Code Example ```dart // Create store instance final store = BattleStore.create('live_room_123'); // Define listeners late final VoidCallback battleInfoListener = _onBattleInfoChanged; late final VoidCallback battleUsersListener = _onBattleUsersChanged; void _onBattleInfoChanged() { final battleInfo = store.battleState.currentBattleInfo.value; if (battleInfo != null) { print('Current PK ID: ${battleInfo.battleID}'); } } void _onBattleUsersChanged() { print('PK user count: ${store.battleState.battleUsers.value.length}'); } // Subscribe to state changes store.battleState.currentBattleInfo.addListener(battleInfoListener); store.battleState.battleUsers.addListener(battleUsersListener); ``` ``` -------------------------------- ### Navigate and Initialize Project Source: https://cloud.tencent.com/document/product/269/92670 After creating the project, change into the project directory and run the initialization script. ```bash cd ChatApp && npm run reset-project ``` -------------------------------- ### Request Body Example for Get Call Info Source: https://cloud.tencent.com/document/product/269/129097 This is a basic example of the JSON request body used to get call information. It requires the 'CallId' of the call you want to query. ```json { "CallId": "055662e1-bc8a-469c-a334-1126c8c17d58" } ``` -------------------------------- ### Request URL Example Source: https://cloud.tencent.com/document/product/269/125717 This is an example of the request URL for the Get Room Metadata API. ```http https://xxxxxx/v4/live_engine_http_srv/get_room_metadata?sdkappid=88888888&identifier=admin&usersig=xxx&random=99999999&contenttype=json ``` -------------------------------- ### Cloud Recording Recorder Start Callback Example Source: https://cloud.tencent.com/document/product/269/131585 This is an example of a callback message when the cloud recording module starts. It includes event group, type, timestamp, and specific event information like RoomId, UserId, and TaskId. The Payload indicates the status of the recorder start. ```json { "CallId": "f6273604-3806-4abb-bc7e-090cd9208ee6", "Callback": { "EventGroupId": 3, "EventType": 301, "CallbackTs": 1774425607091, "EventInfo": { "RoomId": "1280586498", "EventTs": 1774425607, "UserId": "callkit_1500099430_record_1280586498", "TaskId": "-nHuqHlU7islZCDCjMne7HY2TJoU1NbbDkHjVoK-yqHu8ZWQndibQJtEhvB6ShqolkmNmnxz7AE.", "Payload": { "Status": 0 }, "EventMsTs": 1774425607077 }, "KitType": 2 }, "CallbackCommand": "Call.CallbackAfterRecordChanged", "EventTime": 1774425607149 } ``` -------------------------------- ### init Source: https://cloud.tencent.com/document/product/269/127622 Initializes the TUICallEngine with necessary authentication for audio and video capabilities. ```APIDOC ## init ### Description Completes the authentication for basic audio and video call capabilities. This method must be called before other call-related functions. ### Method init ### Endpoint N/A (SDK method) ### Parameters None (Assumes necessary SDKAppID and UserSig are configured globally or via instance properties) ### Request Example ```javascript await tuicallEngine.init(); ``` ### Response None ``` -------------------------------- ### Get Topic API Request URL Example Source: https://cloud.tencent.com/document/product/269/78204 Example of the request URL for the Get Topic API. Ensure to replace placeholders with your actual SDKAppID, identifier, user signature, and random number. ```http https://xxxxxx/v4/million_group_open_http_svc/get_topic?sdkappid=88888888&identifier=admin&usersig=xxx&random=99999999&contenttype=json ``` -------------------------------- ### Install Dependencies for Swift Demo Source: https://cloud.tencent.com/document/product/269/68228 Navigate to the Swift Demo directory and run 'pod install' to install the necessary dependencies. ```bash cd Swift/TUIKitDemo pod install ``` -------------------------------- ### Install Dependencies for Objective-C Demo (iOS) Source: https://cloud.tencent.com/document/product/269/68228 Navigate to the Objective-C iOS Demo directory and run 'pod install' to install the necessary dependencies. ```bash cd iOS/TUIKitDemo pod install ``` -------------------------------- ### Clone and Install Demo Source: https://cloud.tencent.com/document/product/269/125543 Clone the repository and install dependencies to get the Electron live streaming demo running. ```bash git clone https://github.com/Tencent-RTC/ultra-live-electron.git cd ultra-live-electron npm install ``` -------------------------------- ### Install Project Dependencies Source: https://cloud.tencent.com/document/product/269/123277 After creating the project, navigate to the project directory and install its dependencies. ```bash cd chat-example npm install ``` -------------------------------- ### Request Body Example - With StartSeq Source: https://cloud.tencent.com/document/product/269/82029 This example shows how to fetch message extensions starting from a specific sequence number (Seq). ```JSON { "From_Account": "62768", "To_Account": "116400", "MsgKey": "44739199_12_1665388280", "StartSeq": 2 } ``` -------------------------------- ### Install unplugin-vue2-script-setup for Vue 2 Source: https://cloud.tencent.com/document/product/269/106501 Install the unplugin-vue2-script-setup dependency to support script setup syntax in Vue 2 projects. ```bash npm i unplugin-vue2-script-setup ``` -------------------------------- ### Start Development Server Source: https://cloud.tencent.com/document/product/269/106778 Run the npm start command to launch your React development server. Ensure all SDKAppID, userID, and userSig values are correctly replaced before starting. ```bash npm run start ``` -------------------------------- ### Request Body Example Source: https://cloud.tencent.com/document/product/269/125800 Example of the JSON payload sent to your backend when a battle starts. Includes battle details and participant information. ```json { "CallbackCommand": "Live.CallbackAfterStartBattle", "BattleId": "4siHsNsWN/T3aub9zKraqI4zZAyPRpXQhdtKv1q4HOs=", // battle id "Duration": 60000, // battle时长 "CreateTime": 1739954005, // battle创建时间, 单位秒 "StartTime": 1739954005, // battle开启时间, 单位秒 "FromRoomInfo": { // battle 主叫方信息 "RoomId": "pk-3", "Owner_Account": "brennan" }, "ToRoomList": [ // battle 被叫方信息 { "RoomId": "pk-5", "Owner_Account": "tandy" } ], "EventTime":1739954005000 //回调触发时间, 单位毫秒 } ``` -------------------------------- ### Run TUIRoomKit Demo (Vue3) Source: https://cloud.tencent.com/document/product/269/107476 Execute this command in the Vue3 example directory to start the development server and run the TUIRoomKit Demo. Ensure you are on a localhost protocol for access. ```bash #cd TUIRoomKit/Electron/example/vue3 npm run dev ``` -------------------------------- ### Initialize SDK Instance Source: https://cloud.tencent.com/document/product/269/77270 This code snippet demonstrates how to initialize an SDK instance. Ensure all necessary configurations are provided before initialization. ```javascript TencentCloudChat.createInstance({ sdkappid: 1400000000, // ... other options }); ``` -------------------------------- ### Start Development Server Source: https://cloud.tencent.com/document/product/269/123277 Run the development server to launch the Vue3 application. ```bash npm run dev ``` -------------------------------- ### Get Joined Community List (C++) Source: https://cloud.tencent.com/document/product/269/75409 This C++ example demonstrates how to get the list of joined communities. It utilizes a callback mechanism for asynchronous results. ```C++ template class ValueCallback final : public V2TIMValueCallback { public: using SuccessCallback = std::function; using ErrorCallback = std::function; ValueCallback() = default; ~ValueCallback() override = default; void SetCallback(SuccessCallback success_callback, ErrorCallback error_callback) { success_callback_ = std::move(success_callback); error_callback_ = std::move(error_callback); } void OnSuccess(const T& value) override { if (success_callback_) { success_callback_(value); } } void OnError(int error_code, const V2TIMString& error_message) override { if (error_callback_) { error_callback_(error_code, error_message); } } private: SuccessCallback success_callback_; ErrorCallback error_callback_; }; auto callback = new ValueCallback{}; callback->SetCallback( [=](const V2TIMGroupInfoVector& groupInfoList) { // 获取社群列表成功 delete callback; }, [=](int error_code, const V2TIMString& error_message) { // 获取社群列表失败 delete callback; }); V2TIMManager::GetInstance()->GetCommunityManager()->GetJoinedCommunityList(callback); ``` -------------------------------- ### Start the React Frontend Source: https://cloud.tencent.com/document/product/269/125591 Run the command to start the React development server. ```bash npm run dev:react ``` -------------------------------- ### Get Live Room Data Panel Example Source: https://cloud.tencent.com/document/product/269/132567 This example demonstrates how to call the API to retrieve data for a specific live room after the stream has ended. ```APIDOC ## POST /GetLiveRoomDataPanel ### Description Retrieves the data panel for a live streaming room after it has concluded. ### Method POST ### Endpoint /GetLiveRoomDataPanel ### Parameters #### Request Body - **RoomId** (string) - Required - The ID of the live room. ### Request Example { "RoomId": "live_testA" } ### Response #### Success Response (200) - **ActionStatus** (string) - OK indicates success. - **ErrorInfo** (string) - Error message if any. - **ErrorCode** (integer) - Error code, 0 for success. - **RequestId** (string) - Unique request ID. - **Response** (object) - Contains the data panel details. - **TotalViewers** (integer) - Total number of viewers. - **TotalGiftsSent** (integer) - Total number of gifts sent. - **TotalGiftCoins** (integer) - Total gift coins received. - **TotalUniqueGiftSenders** (integer) - Total number of unique gift senders. - **TotalLikesReceived** (integer) - Total likes received. - **TotalMsgCount** (integer) - Total number of messages sent. #### Response Example { "ActionStatus": "OK", "ErrorInfo": "", "ErrorCode": 0, "RequestId": "Id-abc123def456-O-Seq-10001", "Response": { "TotalViewers": 5680, "TotalGiftsSent": 234, "TotalGiftCoins": 46800, "TotalUniqueGiftSenders": 89, "TotalLikesReceived": 12500, "TotalMsgCount": 1830 } } ``` -------------------------------- ### Install AI Chatbot SDK and Vue 2 Script Setup Plugin Source: https://cloud.tencent.com/document/product/269/97537 Install the AI Chatbot SDK and the unplugin-vue2-script-setup plugin for Vue 2 projects. ```bash npm i @tencentcloud/ai-desk-customer-uniapp@latest unplugin-vue2-script-setup ``` -------------------------------- ### Install Dependencies for Objective-C Demo (Mac) Source: https://cloud.tencent.com/document/product/269/68228 Navigate to the Objective-C Mac Demo directory and run 'pod install' to install the necessary dependencies. ```bash cd Mac/TUIKitDemo pod install ``` -------------------------------- ### Install IM SDK and Upload Plugin for WebGL Source: https://cloud.tencent.com/document/product/269/54106 Install the necessary Tencent Cloud IM SDK and upload plugin packages using npm for your WebGL build. Ensure these are installed before proceeding with the WebGL demo setup. ```bash npm init -y npm install @tencentcloud/chat --save npm install tim-upload-plugin --save ``` -------------------------------- ### Run Development Server Source: https://cloud.tencent.com/document/product/269/107477 Start the development server for the uni-app mini program. This command compiles the project and makes it available for testing. ```bash npm run dev:mp-weixin ``` -------------------------------- ### Initialize Login Source: https://cloud.tencent.com/document/product/269/87746 This snippet shows how to initialize the login process. Ensure you have the necessary SDKs imported. ```javascript login.init(); ``` -------------------------------- ### Request Body Example for Call Start Callback Source: https://cloud.tencent.com/document/product/269/129108 This JSON object represents the data sent to your backend when a call starts. It includes call details and user information. ```json { "CallbackCommand":"Call.CallbackAfterStartCall", "CallInfo":{ "CallId":"055662e1-bc8a-469c-a334-1126c8c17d58", "MediaType":"Audio", "ChatGroupId":"", "RoomId":"", "RoomIdType":1 }, "UserList":[ { "User_Account":"user1", "Status":"Calling" }, { "User_Account":"user2", "Status":"Waiting" } ], "EventTime":1740464128807 } ``` -------------------------------- ### Request Body for Get Group Counter Source: https://cloud.tencent.com/document/product/269/85953 This is a basic example of the request body to get group counters. You can specify 'GroupId' and optionally 'GroupCounterKeys' to retrieve specific counters. ```json { "GroupId": "@TGS#aC5SZEAEF", "GroupCounterKeys":[ "like", "unlike" ] } ```