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.

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.
Change the upstream capability of the cross-room anchor in the current room.

CDN APIs

FuncList
DESC
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.
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 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
Set special effects such as beauty, brightening, and rosy skin filters.
Add watermark.

Background music and sound effect APIs

FuncList
DESC
Get sound effect management class (TXAudioEffectManager).
Enable system audio capturing(iOS not supported).
Stop system audio capturing(iOS not supported).
Set the volume of system audio capturing.

Screen sharing APIs

FuncList
DESC
Start screen sharing.
Stop screen sharing.
Pause screen sharing.
Resume screen sharing.
Enumerate shareable screens and windows (for desktop systems only).
Select the screen or window to share (for desktop systems only).
Set the video encoding parameters of screen sharing (i.e., substream) (for desktop and mobile systems).
Set the audio mixing volume of screen sharing (for desktop systems only).
Add specified windows to the exclusion list of screen sharing (for desktop systems only).
Remove specified windows from the exclusion list of screen sharing (for desktop systems only).
Remove all windows from the exclusion list of screen sharing (for desktop systems only).
Add specified windows to the inclusion list of screen sharing (for desktop systems only).
Remove specified windows from the inclusion list of screen sharing (for desktop systems only).
Remove all windows from the inclusion list of screen sharing (for desktop systems only).

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.
.1 Enable third-party beauty filters in video.
.2 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.
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.
The status of a local device changed (for desktop OS only).
The capturing volume of the mic changed.
The playback volume changed.
Whether system audio capturing is enabled successfully (for desktop OS only).
Volume during mic test.
Volume during speaker test.

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.
The shared window was covered (for Windows only).

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).
Started playing background music (disused).
Playback progress of background music (disused).
Background music stopped (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.

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.

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).
Getting the device list (for desktop OS).
Setting the device to use (for desktop OS).
Getting the device currently in use (for desktop OS).
Setting the volume of the current device (for desktop OS).
Getting the volume of the current device (for desktop OS).
Muting the current device (for desktop OS).
Querying whether the current device is muted (for desktop OS).
Set the audio device used by SDK to follow the system default device (for desktop OS).
Starting camera testing (for desktop OS).
Ending camera testing (for desktop OS).
Starting mic testing (for desktop OS).
Ending mic testing (for desktop OS).
Starting speaker testing (for desktop OS).
Ending speaker testing (for desktop OS).
Setting the volume of the current process in the volume mixer (for Windows).
Getting the volume of the current process in the volume mixer (for Windows).
Muting the current process in the volume mixer (for Windows).
Querying whether the current process is muted in the volume mixer (for Windows).
Set camera acquisition preferences.
set onDeviceChanged callback.

Disused APIs

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