English | 简体中文
TRTC Web SDK is an object-oriented WebRTC SDK of Tencent Cloud's real-time communication solution. Web developers can use TRTC Web SDK to establish an audio/video calls or live streaming services on your website.
- Online Demo.
- Changelog.
- We offer SDKs for Web, Android, iOS, Windows, Flutter, explore more in trtc.io.
TRTC Web SDK supports major modern browsers. For details, please refer to Browsers Supported.
Chrome |
Edge |
Firefox |
Safari |
iOS Safari |
Opera |
---|---|---|---|---|---|
56+ | 80+ | 56+ | 11+ | 11+ | 46+ |
npm:
$ npm install trtc-sdk-v5 --save
yarn:
$ yarn add trtc-sdk-v5
Download manually:
- download trtc.js.
- copy
trtc.js
to your project.
Refer to the following two tutorials for a quick run-through of the demo and how to use the SDK to implement basic audio and video calling functionality.
Explore SDK API documents:TRTC Web SDK.
- TRTC is the main entry for TRTC SDK, providing APIs such as create trtc instance(TRTC.create), TRTC.getCameraList, TRTC.getMicrophoneList, TRTC.isSupported.
- trtc instance, provides the core capability for real-time audio and video calls.
- Enter room trtc.enterRoom
- Exit room trtc.exitRoom
- Turn on camera trtc.startLocalVideo
- Turn on microphone trtc.startLocalAudio
- Turn off camera trtc.stopLocalVideo
- Turn off microphone trtc.stopLocalAudio
- Play remote video trtc.startRemoteVideo
- Stop playing remote video trtc.stopRemoteVideo
- Mute/unmute remote audio trtc.muteRemoteAudio
.
├── README.md
├── quick-demo-js -- TRTC Web quick demo (JavaScript edition).
├── quick-demo-vue2-js -- TRTC Web quick demo (Vue.js 2 edition).
├── quick-demo-vue3-ts -- TRTC Web quick demo (Vue.js 3 edition).
├── samples -- TRTC Web feature samples (v5 SDK).
├── SDK -- TRTC Web SDK v5.x (Recommended).
└── v4 -- TRTC Web SDK v4.x (Not recommended).
SDK
- You can find the latest version of the TRTC web SDK 5.x in the
SDK
directory.
quick-demo-js
- Description:
quick-demo-js
is a TRTC Web quick running demo (native JS version), integrating the basic audio and video communication and device selection functions of TRTC Web SDK. It is developed in native JS and can be directly run in the browser. - Running: Refer to the README in the folder.
- Online experience: Quick-demo-js online experience address.
quick-demo-vue2-js
- Description:
quick-demo-vue2-js
is a TRTC Web quick running demo (Vue2 version), integrating the basic audio and video communication and device selection functions of TRTC Web SDK. It is developed in Vue2 + JavaScript and requires you to install the Node environment to run the experience according to the instructions below. - Running: Refer to the README in the folder.
- Online experience: Quick-demo-vue2-js online experience address.
quick-demo-vue3-ts
- Description:
quick-demo-vue3-ts
is a TRTC Web quick running demo (Vue3 version), integrating the basic audio and video communication and device selection functions of TRTC Web SDK. It is developed in Vue3 + TypeScript and requires you to install the Node environment. - Running: Refer to the README in the folder.
- Online experience: Quick-demo-vue3-ts online experience address.
samples
- Description:
samples
contain a variety of specific feature demos of TRTC Web SDK including screen sharing, live streaming, set encoding profile, etc. They are developed in native HTML, CSS and JavaScript. - Running: Refer to the README in the folder.
- Online experience: samples online experience address.
- If you have questions, see FAQs.
- Contact us for technical support.
- To report bugs, please create an issue.