Last updated: 2023-10-09 11:55:23Download PDF
Enters a room. If the room does not exist, the system will create one automatically.
Exits a room.
Switches roles. This API works only in live streaming scenarios (
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.
Starts pushing to Tencent Cloud’s live streaming CDN.
Stops pushing 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.
Enables local video preview (only custom rendering is supported currently).
Stops local video capturing and preview.
Pauses/Resumes sending local video data.
Starts pulling and displaying the image of a specified remote user (only custom rendering is supported currently).
Stops displaying and pulling the video image of a remote user.
Stops displaying and pulling the video images of all remote users.
Pauses/Resumes receiving the video stream of a specified remote user.
Pauses/Resumes receiving all remote video streams.
Sets video encoder parameters.
Sets QoS control parameters.
Sets the mirror mode of encoded images.
Enables local audio capturing and upstream data transfer.
Disables local audio capturing and upstream data transfer.
Mutes/Unmutes local audio.
Mutes/Unmutes a specified remote user.
Mutes/Unmutes all remote users.
Sets the playback volume of a remote user.
Sets the SDK capturing volume.
Gets the SDK capturing volume.
Sets the SDK playback volume.
Gets the SDK playback volume.
Enables volume reminders.
Starts audio recording.
Stops audio recording.
Device management APIs
Music and voice effect APIs
Custom video rendering APIs
Custom message sending APIs
Embeds small-volume custom data in video frames.
Network testing APIs
Callback APIs for the TRTC audio call feature
Error and warning event callback APIs
Error callback. This indicates that the SDK encountered an irrecoverable error. Such errors must be listened for, and UI reminders should be displayed to users if necessary.
Warning callback. This alerts you to non-serious problems such as lag or recoverable decoding failure.
Room event callback APIs
Callback of room entry
Callback of room exit
Callback of 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 (
User event callback APIs
Callback of the entry of a user
Callback of the exit of a user
Callback of whether a user has turned the camera on
Callback of whether a remote user has playable audio
Callback of rendering the first video frame of the local user or a remote user
Callback of playing the first audio frame of a remote user. No notifications are sent for local audio.
Callback of sending the first local video frame
Callback of sending the first local audio frame
Callback APIs for statistics on network quality and technical metrics
Server event callback APIs
Callback of the disconnection of the SDK from the server
Callback of the SDK trying to connect to the server again
Callback of 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
Custom message receiving callback APIs
Callback APIs for CDN relayed push
Callback of starting to push to Tencent Cloud’s live streaming CDN, which corresponds to the
Callback of stopping pushing to Tencent Cloud’s live streaming CDN, which corresponds to the
Callback of the completion of starting relayed push to CDNs
Callback of the completion of stopping relayed push to CDNs
Sets On-Cloud MixTranscoding parameters, which corresponds to the
Definitions of Key Classes
Room entry parameters
Video encoding parameters
On-Cloud MixTranscoding configuration
Room switching parameters
QoS control parameters
Reverb effects (karaoke, room, hall, low and deep, resonant, etc.)
Parameters for music and voice effect setting APIs
Audio recording parameters
Specific Device Management APIs
Gets whether the front camera is being used.
Gets the maximum zoom level of the current camera.
Sets the zoom level of the current camera.
Gets whether automatic facial recognition is supported.
Enables/Disables automatic facial recognition.
Sets camera focus.
Sets the system volume type to use during calls.
Sets the audio route.
Specific Music and Voice Effect APIs
Sets the voice change effects (karaoke, room, hall, low and deep, resonant, etc.)
Sets the callback of the playback progress of background music.
Starts playing background music.
Stops playing background music.
Pauses background music.
Resumes playing background music.
Sets the remote playback volume of background music, i.e., the volume heard by remote users.
Sets the local playback volume of background music.
Sets the local and remote playback volume of background music.
Changes the pitch of background music.
Changes the playback speed of background music.
Gets the playback progress (ms) of background music.
Sets the playback progress (ms) of background music.
Gets the length (ms) of the background music file.