tencent cloud

Tencent Real-Time Communication

Overview

Baixar
Modo Foco
Tamanho da Fonte
Última atualização: 2026-11-17 21:35:42
Copyright (c) 2026 Tencent. All rights reserved.

Module: TXLiteAVSDK
Function: API overview and categorized index
Version: 13.5

Overview of the APIs of Tencent Cloud TRTC Flutter SDK (tencent_rtc_sdk). This document lists all APIs, callbacks and types by feature. Click a name to jump to its detailed description.

Documents at a Glance

Document
Description
TRTCCloud
Main APIs: room, audio/video, screen sharing, CDN publishing, etc.
Event callbacks: room events, audio/video status, quality statistics, etc.
Key type definitions: enums, parameter classes and statistics classes.
Device management: camera, microphone, speaker and audio route.
Audio effect management: background music, in-ear monitoring, reverb and voice changing.
AI capabilities: real-time speech transcription and translation.
How to obtain the instance of each management class:
TXDeviceManager deviceManager = trtcCloud.getDeviceManager();
TXAudioEffectManager audioEffectManager = trtcCloud.getAudioEffectManager();
AITranscriberManager transcriberManager = trtcCloud.getAITranscriberManager();

Index by Scenario

What I Want to Do
Related APIs
Enter/Exit a room
Switch between anchor and audience in live streaming
Turn on the camera and let others see you
Watch others' video
Turn on the microphone and let others hear you
Screen sharing
Beauty filters
Play background music/Karaoke
Switch devices such as camera/speaker
Push streams to live streaming CDN/Cloud stream mixing
Send and receive custom signaling in a room
Display volume bar/sound wave
Monitor call quality
Test network speed before entering a room
Record call content locally
Real-time speech-to-text/translation
Troubleshoot issues/Submit a ticket

TRTCCloud Main APIs

For details, see ​TRTCCloud.

Instance and Event Callbacks

API
Description
Creates a TRTCCloud instance (singleton mode).
Destroys the TRTCCloud instance (singleton mode).
Adds a TRTC event listener.
Removes a TRTC event listener.

Room APIs

API
Description
enterRoom
Enters a room.
exitRoom
Exits a room.
Switches the role.
Switches the room.
Requests a cross-room call.
Exits a cross-room call.
Sets the subscription mode (must be set before entering the room to take effect).

CDN Publishing and Stream Mixing

API
Description
Starts publishing media streams.
Updates published media streams.
Stops publishing media streams.

Video APIs

API
Description
Enables the preview of the local camera.
Updates the preview of the local camera.
Stops the camera preview.
Pauses/Resumes publishing the local video stream.
Subscribes to the video stream of a remote user and binds a video rendering control.
Updates the video rendering control of a remote user.
Stops subscribing to the video stream of a remote user and releases the rendering control.
Stops subscribing to the video streams of all remote users and releases all rendering resources.
Sets the placeholder image displayed while the local video is paused (not supported on Windows/macOS yet).
Adds a watermark (not supported on Windows/macOS yet).
Pauses/Resumes subscribing to the video stream of a remote user.
Pauses/Resumes subscribing to the video streams of all remote users.
Sets the encoding parameters of the video encoder.
Sets the mirror mode of the encoder output.
Sets network quality control parameters.
Sets the rendering parameters of the local video.
Sets the rendering mode of the remote video.
Enables dual-channel encoding mode with big and small images.
Switches between the big and small images of a specified remote user.
Takes a video screenshot (not supported on Windows/macOS yet).
Sets the adaptation mode of G-sensor (mobile only).

Audio APIs

API
Description
Enables local audio capturing and publishing.
Stops local audio capturing and publishing.
Pauses/Resumes publishing the local audio stream.
Pauses/Resumes playing back the audio stream of a remote user.
Pauses/Resumes playing back the audio streams of all remote users.
Sets the playback volume of a remote user.
Sets the capture volume of local audio.
Gets the capture volume of local audio.
Sets the playback volume of remote audio.
Gets the playback volume of remote audio.
Enables volume reminder.
Starts local media recording.
Stops local media recording.

Devices, Beauty Filters and Audio Effects

API
Description
Gets the device management class (TXDeviceManager).
Sets special effects such as beauty, brightening and rosy skin.
Gets the audio effect management class (TXAudioEffectManager).
Enables system audio capturing (Windows only).
Stops system audio capturing (Windows only).
Sets the capture volume of system audio (Windows only).

Screen Sharing

API
Description
Starts screen sharing.
Starts screen sharing via ReplayKit (iOS only).
Stops screen sharing.
Pauses screen sharing.
Resumes screen sharing.
Enumerates shareable screens and windows (desktop only).
Selects the screen or window to share (desktop only).
Adds the specified window to the exclusion list of screen sharing (desktop only).
Removes the specified window from the exclusion list (desktop only).
Removes all windows from the exclusion list (desktop only).
Adds the specified window to the inclusion list of screen sharing (desktop only).
Removes the specified window from the inclusion list (desktop only).
Removes all windows from the inclusion list (desktop only).
Sets the video encoding parameters of screen sharing (i.e., the substream).

Custom Capturing and Custom Messages

API
Description
Enables custom audio capturing mode.
Delivers self-captured audio data to the SDK.
Sets the audio data callback.
Sends a custom message to all users in the room via the UDP channel.
Sends a custom message to all users in the room via the SEI channel.

Network Testing

API
Description
Starts network speed test (used before entering a room).
Stops network speed test.

Debugging APIs

API
Description
Gets the SDK version information.
Sets the log output level.
Enables/Disables console log printing.
Enables/Disables local log compression.
Sets the storage path of local logs.
Sets the log callback.
Displays the dashboard.
Calls experimental APIs.

AI Capabilities

API
Description
Gets the AI transcription management class (AITranscriberManager).

TRTCCloudListener Event Callbacks

For details, see ​TRTCCloudListener.

Error and Warning Events

Callback
Description
onError
Error event callback.
onWarning
Warning event callback.

Room Events

Callback
Description
Callback of whether room entry is successful.
Callback of exiting a room.
Callback of role switching.
Callback of the result of room switching.
Callback of the result of requesting a cross-room call.
Callback of the result of ending a cross-room call.

User and Audio/Video Stream Events

Callback
Description
A user joined the current room.
A user left the current room.
A remote user published/unpublished the primary video stream.
A remote user published/unpublished the substream video.
A remote user published/unpublished their 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.
Callback of remote video status change.
Callback of remote audio status change.
Callback of remote video resolution change.

Network and Technical Metric Statistics

Callback
Description
Real-time network quality statistics callback.
Real-time callback of audio/video technical metric statistics.
Callback of network speed test result.

Connection to the Cloud

Callback
Description
The SDK was disconnected from the cloud.
The SDK is trying to reconnect to the cloud.
The SDK is reconnected to the cloud.

Hardware Device Events

Callback
Description
The camera is ready.
The microphone is ready.
The current audio route changed.
Volume feedback callback.
The system capture volume of the current microphone changed (desktop).
The current system playback volume changed (desktop).
Callback of whether system audio capturing was enabled successfully (desktop only).
Volume callback during microphone test.
Volume callback during speaker test.

Custom Message Receiving Events

Callback
Description
Callback of receiving a custom message.
Callback of losing custom messages.
Callback of receiving an SEI message.

CDN Events

Callback
Description
Callback of starting to publish media streams.
Callback of updating media streams.
Callback of stopping media streams.
Callback of RTMP/RTMPS push status change.

Screen Sharing Events

Callback
Description
Callback of screen sharing start.
Callback of screen sharing pause.
Callback of screen sharing resume.
Callback of screen sharing stop.
Callback of the target window of screen sharing being covered (Windows only).

Local Recording and Local Screenshot Events

Callback
Description
Callback of local recording task start.
Callback of local recording task progress.
Callback of recording segment end.
Callback of local recording task end.
Callback of local screenshot completion.

TXDeviceManager Device Management

For details, see ​TXDeviceManager.

Mobile Device APIs

API
Description
Queries whether the front camera is being used (mobile only).
Switches between the front and rear cameras (mobile only).
Gets the maximum zoom ratio of the camera (mobile only).
Sets the zoom ratio of the camera (mobile only).
Queries whether automatic face position recognition is supported (mobile only).
Enables auto focus (mobile only).
Sets the focus position of the camera (mobile only).
Turns on/off the flash, i.e., the torch mode (mobile only).
Sets the audio route (mobile only).

Desktop Device APIs

API
Description
Gets the device list (desktop only).
Sets the device to use (desktop only).
Gets the device currently in use (desktop only).
Sets the volume of the current device (desktop only).
Gets the volume of the current device (desktop only).
Sets the mute status of the current device (desktop only).
Queries whether the current device is muted (desktop only).
Sets the audio device used by the SDK to follow the system default device (desktop only).

Device Testing (Desktop)

API
Description
Starts camera test (desktop only).
Stops camera test (desktop only).
Starts microphone test (desktop only).
Starts microphone test, with the option to play back the microphone sound (desktop only).
Stops microphone test (desktop only).
Starts speaker test (desktop only).
Stops speaker test (desktop only).

Windows Volume Mixer

API
Description
Sets the volume of the current process in the Windows volume mixer (Windows only).
Gets the volume of the current process in the Windows volume mixer (Windows only).
Sets the mute status of the current process in the Windows volume mixer (Windows only).
Gets the mute status of the current process in the Windows volume mixer (Windows only).

General APIs

API
Description
Sets camera capture preferences.
Sets the device status change callback.

TXAudioEffectManager Audio Effect Management

For details, see ​TXAudioEffectManager.

Voice APIs

API
Description
Enables in-ear monitoring.
Sets the in-ear monitoring volume.
Sets the reverb effect of the voice.
Sets the voice changing effect.
Sets the voice volume.
Sets the voice pitch.

Background Music Playback

API
Description
Sets the background music event callback.
Starts playing background music.
Stops playing background music.
Pauses playing background music.
Resumes playing background music.

Background Music Volume, Pitch and Speed

API
Description
Sets the local and remote volume of all background music.
Sets the remote volume of a specific background music.
Sets the local volume of a specific background music.
Adjusts the pitch of background music.
Adjusts the playback speed of background music.
Adjusts the speed of scratching.

Background Music Progress and Audio Tracks

API
Description
Gets the playback progress of background music (in milliseconds).
Gets the total duration of background music (in milliseconds).
Sets the playback progress of background music (in milliseconds).
Gets the number of audio tracks of background music.
Specifies the audio track for background music playback.

Background Music Preloading

API
Description
Sets the preloading event callback.
Preloads background music.

AITranscriberManager AI Transcription

For details, see ​AITranscriberManager.
API
Description
Starts real-time transcription.
Stops real-time transcription.
Pauses receiving transcription messages.
Resumes receiving transcription messages.
Adds a transcription event listener.
Removes a transcription event listener.

TRTCCloudDef Type Definitions

For details, see ​TRTCCloudDef.

Room and Role

Type
Description
Application scenario.
User role.
Room entry parameters.
Room switching parameters.

Video Encoding and Rendering

Type
Description
Video resolution.
Video aspect ratio mode.
Video stream type.
Video fill mode.
Video rotation direction.
Video mirror type.
Video quality preference.
G-sensor adaptation mode (mobile only).
Video encoding parameters.
Network bandwidth limit parameters.
Video rendering parameters.

Audio

Type
Description
Audio quality.
Audio recording content type.
Audio callback data operation mode.
Audio frame content format.
Volume evaluation parameters.
Format parameters of custom audio callback.
Volume.

Beauty Filters and Watermarks

Type
Description
Beauty (skin smoothing) algorithm.
Source type of the watermark image.

Screen Sharing

Type
Description
Screen sharing target type (desktop only).
Screen sharing target information (desktop only).
Screen/window list.
Advanced control parameters of screen sharing.
Storage structure of window thumbnails and icons.

CDN Publishing and Stream Mixing

Type
Description
Media stream publishing mode.
TRTCUser
Information of users participating in publishing.
Target address of CDN relaying.
Target configuration of media stream publishing.
Layout of each video in the transcoded stream.
Layout of watermarks in the transcoded stream.
Encoding output parameters of media streams.
Cloud stream mixing configuration parameters.

Local Recording and Screenshot

Type
Description
Data source of local video screenshot.
Local media recording type.
Local media recording parameters.

Quality Statistics and Network Speed Test

Type
Description
Network quality.
Audio/Video playback status.
Reason for playback status change.
Network speed test scenario.
Network quality information.
Local audio/video statistics.
Remote audio/video statistics.
Summary statistics of network and performance.
Network speed test parameters.
Network speed test result.

Custom Capturing and Rendering

Type
Description
Video pixel format.
Video data transfer method.
Video texture data.
Video frame information.
Audio frame data.

Logs and Basic Structures

Type
Description
Log level.
TRTCRect
Rectangle coordinates.
TRTCSize
Size (width and height).

Other Callback Classes

Type
Description
Log callback, set via ​setLogCallback.
Device status change callback, set via ​setDeviceObserver.
Background music playback event callback, set via ​setMusicObserver.
Background music preloading event callback, set via ​setPreloadObserver.
AI real-time transcription event callback, set via ​addListener.


Ajuda e Suporte

Esta página foi útil?

comentários