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 TRTCCloudDelegate event callback

Room APIs

FuncList
DESC
Enter room
Exit room
Switch role
Switch role(support permission credential)
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

Video APIs

FuncList
DESC
Enable the preview image of local camera (mobile)
Enable the preview image of local camera (desktop)
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(iOS not supported)
Stop system audio capturing(iOS not supported)
Set the volume of system audio capturing

Screen sharing APIs

FuncList
DESC
Start in-app screen sharing (for iOS 13.0 and above only)
Start system-level screen sharing (for iOS 11.0 and above only)
Start screen sharing
Stop screen sharing
Pause screen sharing
Resume screen sharing
Enumerate shareable screens and windows (for macOS only)
Select the screen or window to share (for macOS 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
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
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)

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

Disused callbacks

FuncList
DESC
An anchor entered the room (disused)
An anchor left the room (disused)
Audio effects ended (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

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
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
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.

Type definitions of audio/video devices

FuncList
DESC
The status of a local device changed (for desktop OS only)

Device APIs

FuncList
DESC
Querying whether the front camera is being used
Switching to the front/rear camera (for mobile OS)
Querying whether the current camera supports zooming (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)
Querying whether flash is supported (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
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)
Starting mic testing (for desktop OS)
Ending mic testing (for desktop OS)
Starting speaker testing (for desktop OS)
Ending speaker testing (for desktop OS)
set onDeviceChanged callback (for Mac)
Set camera acquisition preferences

Disused APIs

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

Disused APIs

FuncList
DESC
Terminate TRTCCloud instance (singleton mode)
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
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
Enable/Disable face auto focus
Setting the system volume type (for mobile OS)
Screencapture video
Start system-level screen sharing (for iOS 11.0 and above only)
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
Start network speed test (used before room entry)
Start screen sharing
Get the list of cameras
Set the camera to be used currently
Get the currently used camera
Get the list of mics
Get the current mic device
Select the currently used mic
Get the current mic volume
Set the current mic volume
Set the mute status of the current system mic
Get the mute status of the current system mic
Get the list of speakers
Get the currently used speaker
Set the speaker to use
Get the current speaker volume
Set the current speaker volume
Get the mute status of the current system speaker
Set whether to mute the current system speaker
Start camera test
Start camera test
Start mic test
Start mic test
Start speaker test
Stop speaker test
start in-app screen sharing (for iOS 13.0 and above only)
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
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