Tencent Cloud TUICallKit

repository·main·Indexed 42 days ago

https://github.com/tencent-rtc/tuicallkit

A high-level UIKit for audio and video calling provided by Tencent Cloud. It provides ready-to-use UI components and handles complex logic such as offline push notifications, group calls, and multi-device synchronization. Supports Android, iOS, Flutter, React Native, and WeChat Mini Programs.

Tokens
36.7K
Snippets
112
Records
194
Agent score
52%

What's inside TUICallKit

  1. Overview of TUICallKit

    main

    TUICallKit is a UI-integrated solution for audio and video calling provided by Tencent Cloud. It allows developers to add video calling capabilities to applications with minimal code, providing a user interface similar to WeChat or FaceTime. It supports offline wake-up capabilities (push notifications) and is available across multiple platforms.

    Key Features:

    • Ready-to-use UI: Saves significant development time by providing a complete calling interface.
    • Multi-platform Interoperability: Supports Web, Android, iOS, WeChat Mini Programs, and cross-platform frameworks like uni-app. Users on different platforms can call, answer, and hang up with each other.
    • Mobile Offline Push: Supports offline wake-up for Android and iOS via services like Google FCM, Apple (APNs), Xiaomi, Huawei, OPPO, VIVO, and Meizu.
    • Group Calling: Supports 1-on-1 calls as well as group video calls, including inviting members mid-call or allowing members to join actively.
    • Multi-device Login: Allows users to log in on multiple devices (e.g., phone and tablet) simultaneously.
    • Advanced Features: Includes support for custom ringtones, custom avatars, AI noise reduction, and weak network optimization.
  2. Overview of TUICallKit for React

    main

    TUICallKit is a React-based UI component library for adding audio and video calling capabilities to Web applications. It provides a high-level interface that allows developers to implement full calling functionality with minimal code.

    Key features include:

    • Comprehensive Functionality: Supports 1v1, group, audio-only, and video calls, including video-to-audio switching and device selection.
    • Low Integration Barrier: Can be implemented with as few as 3 lines of code for a test demo, or 6 lines for full capability integration.
    • Multi-device Adaptation: Optimized layouts for H5 1v1 calls and group calls.
    • High Performance: Low latency (<300ms end-to-end), high packet loss resilience (>80% anti-packet loss, >1000ms anti-jitter), and high-definition support (720P/1080P).
    • Ecosystem Integration: Works with TUIKit to allow initiating calls directly from TIM (Tencent IM) conversations.
    • Internationalization: Supports Chinese, English, and Japanese.
  3. Overview of TUICallKit for Web

    main
    TUICallKit is a React-based UI component designed to add voice and video calling capabilities to web applications. It supports C2C (one-to-one), group, voice, and video calls, with built-in support for switching calling types and selecting devices. The component is optimized for multi-device adaptation, including H5 webviews, and provides high-quality video (up to 1080P) with robust performance in weak network environments (high anti-packet loss and jitter resistance).
  4. Quickstart TUICallKit for React

    main
    TUICallKit is a UIKit component developed by TencentCloud for audio and video calls. It allows developers to integrate video calling functionality into React applications with minimal code. It supports features like offline calls and is compatible with multiple platforms including Android, iOS, Web, and Flutter.
  5. TUICallKit Features and Capabilities

    main

    TUICallKit is a comprehensive UI kit for video and audio calls with the following features:

    • Call Types: Supports single-party, multi-party, audio, and video calls. Supports switching from video to audio calls.
    • Customization: Open-source components allow for reusable logic and custom UI styling.
    • Ecosystem: Integrates with TUIKit, allowing users to initiate audio/video calls directly from TIM (Tencent IM) conversations.
    • Performance:
      • Low latency: Average end-to-end latency < 300ms on global links.
      • Network resilience: >80% packet loss resistance and >1000ms jitter resistance.
      • High quality: Supports 720P and 1080P HD video, maintaining functionality even at 70% packet loss.
  6. Comparison between TUICallKit Vue 2 and Vue 3 Versions

    main

    The TUICallKit source code is shared between the Vue 2 and Vue 3 versions via UniApp conditional compilation. Key differences include:

    FeatureVue 3 VersionVue 2 Version (This Project)
    manifest.json vueVersion"3""2"
    Build ToolVite (vite.config.ts)Webpack (vue.config.js)
    Vue Import Sourcefrom 'vue'from '@vue/composition-api' (via adapter)
    <script setup> SupportNative Vue 3unplugin-vue2-script-setup (HBuilderX built-in)
    Extra DependenciesNone@vue/composition-api
  7. How TUICallKit handles Vue 2/3 compatibility

    main

    TUICallKit uses several techniques to maintain a single codebase for both Vue 2 and Vue 3 environments:

    • Composition API Compatibility Layer: The file TUICallKit/adapter/vue-demi.ts uses UniApp conditional compilation (#ifndef VUE3 / #ifdef VUE3). In Vue 2, it automatically exports from @vue/composition-api, while in Vue 3, it exports from vue.
    • <script setup> Support: In the Vue 2 version, the project leverages unplugin-vue2-script-setup (built into the HBuilderX Vue 2 compiler), allowing components to use <script setup> syntax without modification.
    • Unified Entry Point: main.js uses conditional compilation (#ifndef VUE3 / #ifdef VUE3) to manage different entry logic for the two versions.
  8. Quickstart TUICallKit for Android

    main
    TUICallKit is a UIKit designed for audio and video calls by Tencent Cloud. It allows developers to implement video calling functionality with minimal code and supports offline calling. This guide provides the steps to set up and run the Android sample application.
  9. Getting started with TUICallKit

    main

    To integrate TUICallKit into your application, follow these three primary steps:

    1. Enable Tencent Cloud Audio/Video Calling Service: Activate the service in the Tencent Cloud Console. A free trial version is available for developers.
    2. Integrate TUICallKit: Follow the specific integration guide for your target platform or framework:
    3. Make your first call: Execute the calling logic to test the integration.
  10. QuickStart: Integrate TUICallKit into uni-app

    main

    TUICallKit is a UIKit component for audio and video calls developed by TencentCloud. To integrate it into a uni-app project, follow these steps:

    1. Prerequisites & Environment Setup

    • Editor: Use the latest HBuilderX.
    • iOS: Requires iOS 9.0+ on a physical device (simulators are not supported).
    • Android: Requires Android 4.1+ (SDK API Level 16) on a physical device. Android 5.0+ is recommended. Ensure Allow Debugging is enabled on the device.
    • Network: Devices must have internet connectivity.

    2. Enable TUICallKit Service

    1. Log in to the TRTC Console and create a new application.
    2. In the Application Details page, locate the UI low-code scenario section and click to start a 7-day free trial of TUICallKit.
    3. Save your SDKAppID and SecretKey from the application details page.

    3. Project Configuration

    1. Clone the repository:
      git clone https://github.com/Tencent-RTC/TUICallKit.git
    2. Install dependencies:
      cd ./TUICallKit/uni-app/TUICallKit-app
      npm install
    3. Configure Credentials: Open uni-app/TUICallKit-app/debug/GenerateTestUserSig-es.js and update the following variables with your credentials:
      let SDKAppID = 0; // Replace with your SDKAppID
      let SecretKey = ''; // Replace with your SecretKey

    4. Import the Plugin

    1. Obtain the TencentCloud-TUICallKit plugin from the DCloud extension market. When purchasing (free), ensure you select the correct AppID and bind the correct package name.
    2. In your project, open manifest.json.
    3. Under App Native Plugin Configuration (App原生插件配置), click Select Cloud Plugin (选择云端插件) and choose TencentCloud-TUICallKit plugin.

    5. Run the Project

    1. Create a Custom Debug Base (自定义调试基座) using the Traditional Build (传统打包) method.
    2. Once the build is successful, run the project using the Custom Debug Base.
    git clone https://github.com/Tencent-RTC/TUICallKit.git
    cd ./TUICallKit/uni-app/TUICallKit-app
    npm install