Starter Deal! First 3 month from only  $9.9 /month!
Starter Deal! First 3 month from only  $9.9 /month!
Grab It Now 
RTC Engine
Overview
  • Web
    • Run Sample Demo
    • SDK Quickstart
    • Basic Features
      • Screen Sharing
      • Live Streaming
      • Media Device
      • Audio Volume
      • Set Encoding Profile
      • Detect Network Quality
      • Detect Capabilities
    • Advance Features
      • Enable AI Denoiser
      • Enable Audio Mixer
      • Enable Watermark
      • Enable Beauty and Effects
      • Data Messages
      • Custom Capturing and Rendering
    • API List
    • Released Notes
    • Supported Platforms
    • Web FAQs
      • Optimize Multi-Person Video Calls
      • Handle Autoplay Restriction
      • Handle Firewall Restriction
      • Others
  • Android
    • Integration
      • 1.API Examples
      • 2.Importing the SDK
      • 3.Entering a Room
      • 4.Subscribing to Audio/Video Streams
      • 5.Publish Audio/Video Streams
      • 6.Exiting a Room
      • 7.Sensing Network Quality
      • 8.Enabling Screen Sharing
      • 9.Setting Video Quality
      • 10.Rotating Videos
    • Testing Newwork Quality
    • Custom Capturing and Rendering
    • Custom Audio Capturing and Playback
    • Client APIs
      • Overview
      • TRTCCloud
      • TRTCStatistics
      • TRTCCloudListener
      • TXAudioEffectManager
      • TXBeautyManager
      • TXDeviceManager
      • Type Definition
      • Deprecated Interface
      • Error Codes
    • Solution
      • Real-Time Chorus (TUIKaraoke)
        • Quick Integration
        • Implementation Steps
        • Song Synchronization
        • Lyric Synchronization
        • Vocal Synchronization
        • Mixing Stream Solution
        • TRTCKaraoke APIs
        • FAQs
    • Release Notes
  • iOS
    • Integration
      • 1.API Examples
      • 2.Importing the SDK
      • 3.Entering a Room
      • 4.Subscribing to Audio/Video Streams
      • 5.Publish Audio/Video Streams
      • 6.Exiting a Room
      • 7.Sensing Network Quality
      • 8.Enabling Screen Sharing
      • 9.Setting Video Quality
      • 10.Rotating Videos
    • Testing Network Quality
    • Custom Capturing and Rendering
    • Custom Audio Capturing and Playback
    • Client APIs
      • Overview
      • TRTCCloud
      • TRTCCloudDelegate
      • TRTCStatistics
      • TXAudioEffectManager
      • TXBeautyManager
      • TXDeviceManager
      • Type Definition
      • Deprecated Interface
      • ErrorCode
    • Solution
      • Quick Integration
      • Implementation Steps
      • Song Synchronization
      • Lyric Synchronization
      • Vocal Synchronization
      • Mixing Stream Solution
      • TRTCKaraoke APIs
      • FAQs
    • Release Notes
  • macOS
    • Integration
      • 1.API Examples
      • 2.Importing the SDK
      • 3.Entering a Room
      • 4.Subscribing to Audio/Video Streams
      • 5.Publish Audio/Video Streams
      • 6.Exiting a Room
      • 7.Sensing Network Quality
      • 8.Enabling Screen Sharing
      • 9.Sharing Computer Audio
      • 10.Setting Video Quality
      • 11.Rotating Videos
    • Testing Hardware Devices
    • Testing Network Quality
    • Custom Capturing and Rendering
    • Custom Audio Capturing and Playback
    • Client APIs
      • Overview
      • TRTCCloud
      • TRTCCloudDelegate
      • TRTCStatistics
      • TXAudioEffectManager
      • TXBeautyManager
      • TXDeviceManager
      • Type Definition
      • Deprecated Interface
      • ErrorCode
      • Release Notes
    • Release Notes
  • Windows
    • Integration
      • 1.API Examples
      • 2.Importing the SDK
      • 3.Entering a Room
      • 4.Subscribing to Audio/Video Streams
      • 5.Publish Audio/Video Streams
      • 6.Exiting a Room
      • 7.Sensing Network Quality
      • 8.Enabling Screen Sharing
      • 9.Setting Video Quality
      • 10.Rotating Videos
    • Testing Hardware Devices
    • Testing Network Quality
    • Custom Capturing and Rendering
    • Custom Audio Capturing and Playback
    • Client APIs
      • Overview
      • ITRTCCloud
      • ITRTCStatistics
      • TRTCCloudCallback
      • ITXAudioEffectManager
      • ITXDeviceManager
      • Type Definition
      • Deprecated Interface
      • Error Codes
    • Release Notes
  • Electron
    • Integration
      • 1.API Examples
      • 2.Importing the SDK
      • 3.Entering a Room
      • 4.Subscribing to Audio/Video Streams
      • 5.Publish Audio/Video Streams
      • 6.Exiting a Room
      • 7.Sensing Network Quality
      • 8.Enabling Screen Sharing
      • 9.Sharing Computer Audio
      • 10.Setting Video Quality
      • 11.Rotating Videos
    • Client APIs
      • Overview
      • Error Codes
  • Flutter
    • Integration
      • 1.API Examples
      • 2.Importing the SDK
      • 3.Entering a Room
      • 4.Subscribing to Audio/Video Streams
      • 5.Publish Audio/Video Streams
      • 6.Exiting a Room
      • 7.Sensing Network Quality
      • 8.Enabling Screen Sharing
      • 9.Sharing Computer Audio
      • 10.Setting Video Quality
      • 11.Rotating Videos
    • Client APIs
      • Overview
      • Error Codes
  • Unity
    • Integration
      • 1.API Examples
      • 2Importing the SDK
    • Client APIs
      • Overview
      • Error Codes
  • Qt
    • Integration
      • 1.Importing the SDK
  • Overview
    • Overview
  • Concepts
  • Features
  • Performance Statistics
  • Pricing
    • RTC-Engine Packages
    • Billing of On-Cloud Recording
    • Billing of MixTranscoding and Relay to CDN
    • Billing Explanation for Subscription Package Duration
    • Billing of Monitoring Dashboard
    • Free Minutes
    • Pay-As-You-Go
  • Tencent RTC Quickplay: Experience Ultimate Real-Time Audio and Video Interaction!
  • FAQs
    • FAQs for Beginners
    • Migration Guide
      • Twilio Video to Tencent RTC
      • Billing
      • Features
      • UserSig
      • Firewall Restrictions
      • How to Downsize Installation Package
      • TRTCCalling for Web
      • Audio and Video Quality
      • Others
RTC Engine

Overview

API OVERVIEW

Create Instance And Event Callback

FuncList
DESC
Create TRTCCloud instance (singleton mode)
Terminate TRTCCloud instance (singleton mode)
Add TRTC event callback
Remove TRTC event callback
Set the queue that drives the TRTCCloudListener event callback

Room APIs

FuncList
DESC
Enter room
Exit room
Switch role
Switch room
Request cross-room call
Exit cross-room call
Set subscription mode (which must be set before room entry for it to take effect)
Create room subinstance (for concurrent multi-room listen/watch)
Terminate room subinstance


CDN APIs

FuncList
DESC
Start publishing audio/video streams to Tencent Cloud CSS CDN
Stop publishing audio/video streams to Tencent Cloud CSS CDN
Start publishing audio/video streams to non-Tencent Cloud CDN
Stop publishing audio/video streams to non-Tencent Cloud CDN
Set the layout and transcoding parameters of On-Cloud MixTranscoding
Publish a stream
Modify publishing parameters
Stop publishing

Video APIs

FuncList
DESC
Enable the preview image of local camera (mobile)
Update the preview image of local camera
Stop camera preview
Pause/Resume publishing local video stream
Set placeholder image during local video pause
Subscribe to remote user's video stream and bind video rendering control
Update remote user's video rendering control
Stop subscribing to remote user's video stream and release rendering control
Stop subscribing to all remote users' video streams and release all rendering resources
Pause/Resume subscribing to remote user's video stream
Pause/Resume subscribing to all remote users' video streams
Set the encoding parameters of video encoder
Set network quality control parameters
Set the rendering parameters of local video image
Set the rendering mode of remote video image
Enable dual-channel encoding mode with big and small images
Switch the big/small image of specified remote user
Screencapture video
Sets perspective correction coordinate points.
Set the adaptation mode of gravity sensing (version 11.7 and above)

Audio APIs

FuncList
DESC
Enable local audio capturing and publishing
Stop local audio capturing and publishing
Pause/Resume publishing local audio stream
Pause/Resume playing back remote audio stream
Pause/Resume playing back all remote users' audio streams
Set audio route
Set the audio playback volume of remote user
Set the capturing volume of local audio
Get the capturing volume of local audio
Set the playback volume of remote audio
Get the playback volume of remote audio
Enable volume reminder
Start audio recording
Stop audio recording
Start local media recording
Stop local media recording
Set the parallel strategy of remote audio streams
Enable 3D spatial effect
Update self position and orientation for 3D spatial effect
Update the specified remote user's position for 3D spatial effect
Set the maximum 3D spatial attenuation range for userId's audio stream

Device management APIs

FuncList
DESC
Get device management class (TXDeviceManager)

Beauty filter and watermark APIs

FuncList
DESC
Get beauty filter management class (TXBeautyManager)
Add watermark

Background music and sound effect APIs

FuncList
DESC
Get sound effect management class (TXAudioEffectManager)
Enable system audio capturing
Stop system audio capturing(iOS not supported)

Screen sharing APIs

FuncList
DESC
Start screen sharing
Stop screen sharing
Pause screen sharing
Resume screen sharing
Set the video encoding parameters of screen sharing (i.e., substream) (for desktop and mobile systems)

Custom capturing and rendering APIs

FuncList
DESC
Enable/Disable custom video capturing mode
Deliver captured video frames to SDK
Enable custom audio capturing mode
Deliver captured audio data to SDK
Enable/Disable custom audio track
Mix custom audio track into SDK
Set the publish volume and playback volume of mixed custom audio track
Generate custom capturing timestamp
Set video data callback for third-party beauty filters
Set the callback of custom rendering for local video
Set the callback of custom rendering for remote video
Set custom audio data callback
Set the callback format of audio frames captured by local mic
Set the callback format of preprocessed local audio frames
Set the callback format of audio frames to be played back by system
Enabling custom audio playback
Getting playable audio data

Custom message sending APIs

FuncList
DESC
Use UDP channel to send custom message to all users in room
Use SEI channel to send custom message to all users in room

Network test APIs

FuncList
DESC
Start network speed test (used before room entry)
Stop network speed test

Debugging APIs

FuncList
DESC
Get SDK version information
Set log output level
Enable/Disable console log printing
Enable/Disable local log compression
Set local log storage path
Set log callback
Display dashboard
Set dashboard margin
Call experimental APIs

Encrypted interface

FuncList
DESC
Enable or disable private encryption of media streams

Error and warning events

FuncList
DESC
Error event callback
Warning event callback

Room event callback

FuncList
DESC
Whether room entry is successful
Room exit
Role switching
Result of room switching
Result of requesting cross-room call
Result of ending cross-room call
Result of changing the upstream capability of the cross-room anchor

User event callback

FuncList
DESC
A user entered the room
A user exited the room
A remote user published/unpublished primary stream video
A remote user published/unpublished substream video
A remote user published/unpublished audio
The SDK started rendering the first video frame of the local or a remote user
The SDK started playing the first audio frame of a remote user
The first local video frame was published
The first local audio frame was published
Change of remote video status
Change of remote audio status
Change of remote video size

Callback of statistics on network and technical metrics

FuncList
DESC
Real-time network quality statistics
Real-time statistics on technical metrics
Callback of network speed test

Callback of connection to the cloud

FuncList
DESC
The SDK was disconnected from the cloud
The SDK is reconnecting to the cloud
The SDK is reconnected to the cloud

Callback of hardware events

FuncList
DESC
The camera is ready
The mic is ready
The audio route changed (for mobile devices only)
Volume

Callback of the receipt of a custom message

FuncList
DESC
Receipt of custom message
Loss of custom message
Receipt of SEI message

CDN event callback

FuncList
DESC
Started publishing to Tencent Cloud CSS CDN
Stopped publishing to Tencent Cloud CSS CDN
Started publishing to non-Tencent Cloud’s live streaming CDN
Stopped publishing to non-Tencent Cloud’s live streaming CDN
Set the layout and transcoding parameters for On-Cloud MixTranscoding
Callback for starting to publish
Callback for modifying publishing parameters
Callback for stopping publishing
Callback for change of RTMP/RTMPS publishing status

Screen sharing event callback

FuncList
DESC
Screen sharing started
Screen sharing was paused
Screen sharing was resumed
Screen sharing stopped

Callback of local recording and screenshot events

FuncList
DESC
Local recording started
Local media is being recorded
Record fragment finished.
Local recording stopped
Finished taking a local screenshot

Disused callbacks

FuncList
DESC
An anchor entered the room (disused)
An anchor left the room (disused)
Audio effects ended (disused)
Result of server speed testing (disused)

Callback of custom video processing

FuncList
DESC
Custom video rendering
An OpenGL context was created in the SDK.
Video processing by third-party beauty filters
The OpenGL context in the SDK was destroyed

Callback of custom audio processing

FuncList
DESC
Audio data captured by the local mic and pre-processed by the audio module
Audio data captured by the local mic, pre-processed by the audio module, effect-processed and BGM-mixed
Audio data of each remote user before audio mixing
Data mixed from each channel before being submitted to the system for playback
Data mixed from all the captured and to-be-played audio in the SDK
In-ear monitoring data

Other event callbacks

FuncList
DESC
Printing of local log

Background music preload event callback

FuncList
DESC
Background music preload progress
Background music preload error

Callback of playing background music

FuncList
DESC
Background music started.
Playback progress of background music
Background music ended

Voice effect APIs

FuncList
DESC
Enabling in-ear monitoring
Setting in-ear monitoring volume
Setting voice reverb effects
Setting voice changing effects
Setting speech volume
Setting speech pitch

Background music APIs

FuncList
DESC
Setting the background music callback
Starting background music
Stopping background music
Pausing background music
Resuming background music
Setting the local and remote playback volume of background music
Setting the remote playback volume of a specific music track
Setting the local playback volume of a specific music track
Adjusting the pitch of background music
Changing the speed of background music
Getting the playback progress (ms) of background music
Getting the total length (ms) of background music
Setting the playback progress (ms) of background music
Adjust the speed change effect of the scratch disc
Setting music preload callback
Preload background music
Get the number of tracks of background music
Specify the playback track of background music

beauty interface

FuncList
DESC
Sets the beauty (skin smoothing) filter algorithm.
Sets the strength of the beauty filter.
Sets the strength of the brightening filter.
Enables clarity enhancement.
Sets the strength of the rosy skin filter.
Sets color filter.
Sets the strength of color filter.
Sets green screen video
Sets the strength of the eye enlarging filter.
Sets the strength of the face slimming filter.
Sets the strength of the chin slimming filter.
Sets the strength of the chin lengthening/shortening filter.
Sets the strength of the face shortening filter.
Sets the strength of the face narrowing filter.
Sets the strength of the nose slimming filter.
Sets the strength of the eye brightening filter.
Sets the strength of the teeth whitening filter.
Sets the strength of the wrinkle removal filter.
Sets the strength of the eye bag removal filter.
Sets the strength of the smile line removal filter.
Sets the strength of the hairline adjustment filter.
Sets the strength of the eye distance adjustment filter.
Sets the strength of the eye corner adjustment filter.
Sets the strength of the mouth shape adjustment filter.
Sets the strength of the nose wing narrowing filter.
Sets the strength of the nose position adjustment filter.
Sets the strength of the lip thickness adjustment filter.
Sets the strength of the face shape adjustment filter.
Selects the AI animated effect pendant.
Sets whether to mute during animated effect playback.

Device APIs

FuncList
DESC
Querying whether the front camera is being used
Switching to the front/rear camera (for mobile OS)
Getting the maximum zoom ratio of the camera (for mobile OS)
Setting the camera zoom ratio (for mobile OS)
Querying whether automatic face detection is supported (for mobile OS)
Enabling auto focus (for mobile OS)
Adjusting the focus (for mobile OS)
Enabling/Disabling flash, i.e., the torch mode (for mobile OS)
Setting the audio route (for mobile OS)
Set the exposure parameters of the camera, ranging from - 1 to 1
Set camera acquisition preferences

Disused APIs

FuncList
DESC
Setting the system volume type (for mobile OS)

Disused APIs

FuncList
DESC
Set TRTC event callback
Set the strength of beauty, brightening, and rosy skin filters.
Set the strength of eye enlarging filter
Set the strength of face slimming filter
Set the strength of chin slimming filter
Set the strength of chin lengthening/shortening filter
Set the strength of face shortening filter
Set the strength of nose slimming filter
Set animated sticker
Mute animated sticker
Set color filter
Set the strength of color filter
Set green screen video
Set reverb effect
Set voice changing type
Enable or disable in-ear monitoring
Enable volume reminder
Switch camera
Query whether the current camera supports zoom
Set camera zoom ratio (focal length)
Query whether the device supports flash
Enable/Disable flash
Query whether the camera supports setting focus
Set the focal position of camera
Query whether the device supports the automatic recognition of face position
Setting the system volume type (for mobile OS)
Query whether a certain audio capability is supported (only for Android)
Set sound quality
Start displaying remote video image
Stop displaying remote video image and pulling the video data stream of remote user
Set the rendering mode of local image
Set the clockwise rotation angle of local image
Set the mirror mode of local camera's preview image
Set the fill mode of substream image
Set the clockwise rotation angle of remote image
Start displaying the substream image of remote user
Stop displaying the substream image of remote user
Set the fill mode of substream image
Set the clockwise rotation angle of substream image
Set sound quality
Specify whether to view the big or small image
Set mic volume
Start background music
Stop background music
Stop background music
Stop background music
Get the total length of background music in ms
Set background music playback progress
Set background music volume
Set the local playback volume of background music
Set the remote playback volume of background music
Play sound effect
Set sound effect volume
Stop sound effect
Stop all sound effects
Set the volume of all sound effects
Pause sound effect
Pause sound effect
Enable custom video capturing mode
Deliver captured video data to SDK
Pause/Resume publishing local video stream
Pause/Resume subscribing to remote user's video stream
Screencapture video
Start network speed test (used before room entry)
Start screen sharing
Set the direction of image output by video encoder
Set the mirror mode of image output by encoder
Set the adaptation mode of G-sensor