Overview

TRTCCloud

Basic APIs

API
Description
Creates a TRTCCloud singleton.
Terminates a TRTCCloud singleton.
Registers a listener.
Unregisters a listener.

Room APIs

API
Description
Enters a room. If the room does not exist, the system will create one.
Leaves a room.
Switches roles. This API works only in live streaming scenarios (TRTC_APP_SCENE_LIVE and TRTC_APP_SCENE_VOICE_CHATROOM).
Sets the audio/video data receiving mode, which must be set before room entry to take effect.
Requests a cross-room call (anchor competition).
Exits a cross-room call.
Switches rooms.

CDN APIs

API
Description
Starts publishing to Tencent Cloud’s live streaming CDN.
Stops publishing to Tencent Cloud’s live streaming CDN.
Starts relaying to the live streaming CDN of a non-Tencent Cloud vendor.
Stops relaying to non-Tencent Cloud addresses.
Sets On-Cloud MixTranscoding parameters.

Video APIs

API
Description
Pauses/Resumes publishing local video data.
Starts playing the video of a remote user.
Stops playing and pulling the video of a remote user.
Pauses/Resumes receiving the video of a remote user.
Pauses/Resumes receiving the videos of all remote users.
Sets video encoder parameters.
Sets video preference.
Sets the rotation of encoded video images, i.e., images presented to remote users and recorded by the server.
Sets the mirror mode of encoded images.
Sets the adaptation mode of the G-sensor.
Sets the image to display when local video publishing is paused.

Audio APIs

API
Description
Enables local audio capturing and publishing.
Disables local audio capturing and publishing.
Mutes/Unmutes the local user.
Sets the audio route.
Mutes/Unmutes a remote user.
Mutes/Unmutes all remote users.
Sets the SDK capturing volume.
Gets the SDK capturing volume.
Sets the SDK playback volume.
Gets the SDK playback volume.
Enables the volume reminder.
Starts audio recording.
Stops audio recording.

Device management APIs

API
Description
Gets the device manager. For API details, see the document on device management.

Beauty filter APIs

API
Description
Gets the beauty filter manager. For API details, see the document on beauty filter management.
Adds a watermark.

Music and audio effect APIs

API
Description
Gets the audio effect manager TXAudioEffectManager, which is used to manage background music, short audio effects, and voice changing effects. For API details, see the document on audio effect management.

Network testing APIs

API
Description
Starts network speed testing, which should be avoided during video calls to ensure call quality.
Stops server speed testing.

Log APIs

API
Description
Gets the SDK version.
Sets the log output level.
Changes the path to save logs.
Enables/Disables local log compression.
Enables/Disables console log printing.

TRTCCloudListener

TRTC callback APIs

Error and warning event callback APIs

API
Description
Error callback. This indicates that the SDK encountered an unrecoverable error. Such errors must be listened for, and UI reminders should be sent to users if necessary.
Warning callback. This callback alerts you to non-serious problems such as stutter or recoverable decoding failure.

Room event callback APIs

API
Description
Callback for room entry
Callback for room exit
Callback for role switching
Callback of the result of requesting a cross-room call (anchor competition)
Callback of the result of ending a cross-room call (anchor competition)
Callback of the result of room switching (switchRoom)

User event callback APIs

API
Description
Callback for the entry of a remote user
Callback for the exit of a remote user
Callback of whether a remote user has a playable primary image (usually the image of the camera)
Callback of whether a remote user has a playable substream image (usually the screen sharing image)
Callback of whether a remote user has playable audio data
Callback for rendering the first video frame of the local user or a remote user
Callback for playing the first audio frame of a remote user. No notifications are sent for local audio.
Callback for sending the first local video frame
Callback for sending the first local audio frame

Callback APIs for background music playback

Callback APIs for background music playback
API
Description
Callback for starting music
Callback of the music playback progress
Callback for ending music

Callback APIs for statistics on network quality and technical metrics

API
Description
Callback of network quality. This callback is triggered every 2 seconds to collect statistics on the quality of current upstream and downstream data transfer.
Callback of statistics on technical metrics

Server event callback APIs

API
Description
Callback for the disconnection of the SDK from the server
Callback for the SDK trying to reconnect to the server
Callback for the reconnection of the SDK to the server
Callback of server speed test results. The SDK tests the speed of multiple server addresses, and the result of each test is returned through this callback.

Hardware event callback APIs

API
Description
Callback for the camera being ready
Callback for the mic being ready
Callback of volume, including the volume of each userId and the total remote volume

Callback APIs for CDN relayed push

API
Description
Callback for starting publishing to Tencent Cloud’s live streaming CDN. This callback is triggered by the startPublishing() API in TRTCCloud.
Callback for stopping publishing to Tencent Cloud’s live streaming CDN. This callback is triggered by the stopPublishing() API in TRTCCloud.
Callback for starting relayed push to CDNs
Callback for stopping relayed push to CDNs
Callback for setting On-Cloud MixTranscoding parameters. This callback is triggered by the setMixTranscodingConfig() API in TRTCCloud.

Definitions of Key Types

Class
Description
Variables of key type definitions
Room entry parameters
Room switching parameters
Video encoding parameters
QoS control parameters
Remote video parameters
Position of the image of each channel in On-Cloud MixTranscoding
On-Cloud MixTranscoding configuration
Voice changing effects (little girl, middle-aged man, metal, punk, etc.)
Reverb effects (karaoke, room, hall, low and deep, resonant, etc.)
Parameters for music and audio effect setting APIs
Audio recording parameters
CDN relaying parameters