- Release Notes and Announcements
- User Tutorial
- Product Introduction
- Purchase Guide
- Free Demo
- SDK Download
- Integration (UI Included)
- TUIKit Overview
- Audio/Video Call
- Overview (TUICallKit)
- Integration (TUICallKit)
- UI Customization (TUICallKit)
- Offline Call Push (TUICallKit)
- On-Cloud Recording (TUICallKit)
- API Documentation (TUICallKit)
- Release Notes (TUICallKit)
- FAQs
- Audio/Video Conference
- Overview (TUIRoomKit)
- Integration (TUIRoomKit)
- UI Customization (TUIRoomKit)
- API Documentation(TUIRoomKit)
- iOS&Mac
- Android
- Windows
- Web
- Electron
- Flutter
- FAQs
- Error Code
- Interactive Live Audio Streaming
- Interactive Video Streaming
- Online Karaoke
- Quick Integration (TUIKaraoke)
- Solution Overview (TUIKaraoke)
- TUIKaraoke APIs
- FAQs
- Integration (No UI)
- 0. API Examples
- 1. Importing the SDK
- 2. Entering a Room
- 3. Subscribing to Audio/Video Streams
- 4. Publishing Audio/Video Streams
- 5. Exiting a Room
- 6. Sensing Network Quality
- 7. Enabling Screen Sharing
- 8. Sharing Computer Audio
- 9. Setting Video Quality
- 10. Rotating Videos
- 11.FAQs
- Advanced Features
- Relay to CDN
- Enabling Advanced Permission Control
- RTMP Streaming with TRTC
- Testing Hardware Devices
- Testing Network Quality
- On-Cloud Recording
- Custom Capturing and Rendering
- Custom Audio Capturing and Playback
- Sending and Receiving Messages
- Event Callbacks
- Content Moderation
- Access Management
- How to push stream to TRTC room with OBS WHIP
- Sample Code
- Client APIs
- iOS and macOS
- Android
- All Platforms (C++)
- Web
- Electron
- Flutter
- Unity
- Server APIs
- History
- Introduction
- API Category
- Making API Requests
- Room Management APIs
- Call Quality Monitoring APIs
- Pull stream Relay Related interface
- Stream mixing and relay APIs
- On-cloud recording APIs
- Usage Statistics APIs
- Data Types
- Error Codes
- Appendix
- Console Guide
- Selection of Service region
- Application Management
- Package Management
- Usage Statistics
- Monitoring Dashboard
- Development Assistance
- FAQs
- Legacy Documentation
- Service Level Agreement
- TRTC Policy
- Glossary
Menu
Web
Last updated: 2023-09-08 10:23:54Download PDF
This document describes how to import TRTC Web SDK into your project.


Supported Platforms
The TRTC Web SDK supports all major browsers such as Chrome, Edge, Firefox, Safari, and Opera. For a list of browsers supported by TRTC, see Supported Platforms.
Import SDK to your project
By npm
1. Use npm to install trtc-sdk-v5 package in your project.
npm install trtc-sdk-v5 --save
2. Import the module in the project script.
import TRTC from 'trtc-sdk-v5';
By script
1. Download SDK file trtc.js from Github.
2. Add the following code to your webpage:
<script src="trtc.js"></script>