Skip to content

Repository files navigation

TRTC Web SDK

English | 简体中文

Tencent Real-Time Communication (TRTC) Web SDK is a professional WebRTC SDK for building real-time video calls, voice calls, live streaming, video conferencing, online education, and interactive social experiences in web applications.

npm versionGitHub starsOnline DemoDocumentation

What is TRTC?

TRTC (Tencent Real-Time Communication) is Tencent Cloud's real-time audio and video platform. This repository contains the Web SDK, demo projects, and feature samples for browser-based RTC applications.

With TRTC Web SDK, you can build:

  • 1-to-1 and group video calls for social, healthcare, and customer support apps
  • Voice calls and voice rooms for gaming, communities, and social audio products
  • Interactive live streaming with host-audience scenarios
  • Video conferencing with screen sharing and device control
  • Online education and collaboration products running directly in browsers

TRTC Product Family

TRTC offers both core SDKs and ready-to-use UI kits, so teams can start quickly or build fully custom RTC experiences.

ProductBest forPlatforms
AI Real-Time ConversationLow-latency AI voice and conversational interactionWeb, Android, iOS, Flutter, React Native, Electron, Windows, macOS
ChatInstant messaging, one-to-one chat, group chat, and conversation capabilitiesWeb, Mini Program, uni-app, Android, iOS, macOS, Windows, Flutter, React Native, HarmonyOS, Unity, Unreal Engine
TUICallKit1v1 and group audio/video calling UIWeb, Android, iOS, Flutter, uni-app, WeChat Mini Program
TUIRoomKitVideo conferencing and online meetings UIWeb, Android, iOS, Flutter, uni-app (Mini Program / Client)
TUILiveKitInteractive live streaming and voice room UIWeb, Android, iOS, Flutter, uni-app, React Native (headless), Windows (Electron)
TRTC SDKCross-platform real-time audio and video SDK for fully customized developmentWeb, Android, iOS, macOS, Windows, Flutter, Electron, React Native

Why developers use TRTC Web SDK

  • Built on Tencent RTC’s globally proven real-time network: backed by Tencent’s long-standing expertise in audio/video and network technology, with below 300 ms end-to-end latency for calling scenarios, below 1000 ms audience latency for live streaming, and over 99.99% service uptime
  • Low-latency, production-ready communication: optimized for video calls, voice calls, interactive live streaming, conferencing, and other scenarios that need fast join times, stable connectivity, and smooth interaction
  • Cross-browser support with cross-platform interoperability: works on major modern desktop and mobile browsers and fits naturally into product ecosystems that also span Android, iOS, Flutter, Electron, and React Native
  • Flexible integration model: supports vanilla JavaScript, Vue, and any web framework, so teams can prototype quickly or integrate into existing frontend architectures
  • Ready for meetings, live streaming, and richer RTC workflows: beyond calling, it supports screen sharing, host/audience live streaming, cross-room co-hosting, and other common real-time interaction patterns
  • Strong diagnostics for devices, environments, and challenging networks: includes browser capability checks, permission and device detection, network quality evaluation, device hot-plug handling, and debug workflows
  • Advanced media and live orchestration: custom capture/rendering, multi-user video with small stream, cloud mixing and CDN streaming, watermarking, and video mixer workflows for more complex media pipelines
  • Plugin-based enhancement and AI capabilities: audio mixer, beauty/basic beauty, virtual background, AI noise reduction, voice changer, face detection, small-stream auto switching, and real-time transcription/translation
  • Clear path from core SDK to faster delivery: build deeply customized RTC experiences with the SDK, or move faster with Call, Conference, Live, Chat, and other UIKit-based solutions in the Tencent RTC ecosystem

Quick Start

Install

npm install trtc-sdk-v5 --save

or

yarn add trtc-sdk-v5

You can also download trtc.js manually and include it in your project.

Basic Usage

importTRTCfrom'trtc-sdk-v5';consttrtc=TRTC.create();awaittrtc.enterRoom({
sdkAppId,
userId,
userSig,strRoomId: 'room_123',});awaittrtc.startLocalVideo({view: document.getElementById('local-video'),});awaittrtc.startLocalAudio();

Security note: Generate userSig on your application server for production. Do not expose SDKSecretKey in frontend code.

Useful links

Common Questions This Repository Helps Answer

How do I add video calling to my web app?

Install trtc-sdk-v5, create a TRTC instance, call enterRoom(), then start local audio and video. If you want the most complete modern starter in this repository, begin with quick-demo-react, then use the other quick demos as framework-specific references.

Does TRTC Web SDK work with React, Vue, or other frameworks?

Yes. TRTC Web SDK works with any JavaScript framework. This repository now includes a React + TypeScript demo as the primary recommended example, plus vanilla JavaScript, Vue 2, and Vue 3 + TypeScript demos for different project styles.

How do I implement screen sharing, live streaming, or other RTC features in browsers?

Start with the runnable demos in this repository. We recommend quick-demo-react first for a modern React-based integration reference, then samples for feature-specific examples, followed by quick-demo-js, quick-demo-vue2-js, and quick-demo-vue3-ts when you want lighter or framework-targeted demos.

Repository Guide

DirectoryWhat it containsNotes
quick-demo-reactReact 18 + TypeScript + Vite quick demoRecommended first demo for modern web projects
quick-demo-jsQuick start demo built with vanilla JavaScriptGood for understanding the bare SDK flow quickly
quick-demo-vue2-jsVue 2 demoGood for legacy Vue projects
quick-demo-vue3-tsVue 3 + TypeScript demoGood for Vue 3 + TypeScript projects
samplesFeature demos such as screen sharing and live streamingBest for exploring specific capabilities
SDKTRTC Web SDK v5.x filesRecommended SDK version
v4TRTC Web SDK v4.x filesLegacy version, not recommended for new projects

Browser Support

TRTC Web SDK supports major modern browsers.

BrowserVersion
Chrome56+
Edge80+
Firefox56+
Safari11+
iOS Safari11+
Opera46+

Other TRTC Repositories

Platform / ProductRepository
Android SDKTRTC_Android
iOS SDKTRTC_iOS
Flutter UIKitTUIKit_Flutter
React Native UIKitTUIKit_ReactNative
Calling UI KitTUICallKit
Meeting UI KitTUIRoomKit
Live UI KitTUILiveKit

Resources

Contact Us

  • If you find a bug, please create an issue in this repository.
  • If you need technical support for your TRTC project, see Contact Technical Support.

About

Tencent RTC Web SDK — Real-time video calls, voice calls, live streaming, and conferencing for web apps. Powers TUICallKit, TUIRoomKit, and TUILiveKit.

Topics

Resources

Stars

158 stars

Watchers

5 watching

Forks

Releases

Packages

Used by

Contributors

Languages