Last updated: 2021-09-09 11:41:49

    Create Instance And Event Callback

    sharedInstance Create TRTCCloud instance (singleton mode)
    destroySharedInstance Terminate TRTCCloud instance (singleton mode)
    setListener Set TRTC event callback
    setListenerHandler Set the queue that drives the TRTCCloudDelegate event callback

    Room APIs

    enterRoom Enter room
    exitRoom Exit room
    switchRole Switch role
    switchRoom Switch room
    ConnectOtherRoom Request cross-room call
    DisconnectOtherRoom Exit cross-room call
    setDefaultStreamRecvMode Set subscription mode (which must be set before room entry for it to take effect)
    createSubCloud Create room subinstance (for concurrent multi-room listen/watch)
    destroySubCloud Terminate room subinstance

    CDN APIs

    startPublishing Start publishing audio/video streams to Tencent Cloud CSS CDN
    stopPublishing Stop publishing audio/video streams to Tencent Cloud CSS CDN
    startPublishCDNStream Start publishing audio/video streams to non-Tencent Cloud CDN
    stopPublishCDNStream Stop publishing audio/video streams to non-Tencent Cloud CDN
    setMixTranscodingConfig Set the layout and transcoding parameters of On-Cloud MixTranscoding

    Video APIs

    startLocalPreview Enable the preview image of local camera (mobile)
    updateLocalView Update the preview image of local camera
    stopLocalPreview Stop camera preview
    muteLocalVideo Pause/Resume publishing local video stream
    setVideoMuteImage Set placeholder image during local video pause
    startRemoteView Subscribe to remote user's video stream and bind video rendering control
    updateRemoteView Update remote user's video rendering control
    stopRemoteView Stop subscribing to remote user's video stream and release rendering control
    stopAllRemoteView Stop subscribing to all remote users' video streams and release all rendering resources
    muteRemoteVideoStream Pause/Resume subscribing to remote user's video stream
    muteAllRemoteVideoStreams Pause/Resume subscribing to all remote users' video streams
    setVideoEncoderParam Set the encoding parameters of video encoder
    setNetworkQosParam Set network quality control parameters
    setLocalRenderParams Set the rendering parameters of local video image
    setRemoteRenderParams Set the rendering mode of remote video image
    setVideoEncoderRotation Set the direction of image output by video encoder
    setVideoEncoderMirror Set the mirror mode of image output by encoder
    setGSensorMode Set the adaptation mode of G-sensor
    enableEncSmallVideoStream Enable dual-channel encoding mode with big and small images
    setRemoteVideoStreamType Switch the big/small image of specified remote user
    snapshotVideo Screencapture video

    Audio APIs

    startLocalAudio Enable local audio capturing and publishing
    stopLocalAudio Stop local audio capturing and publishing
    muteLocalAudio Pause/Resume publishing local audio stream
    muteRemoteAudio Pause/Resume playing back remote audio stream
    muteAllRemoteAudio Pause/Resume playing back all remote users' audio streams
    setAudioRoute Set audio route
    setRemoteAudioVolume Set the audio playback volume of remote user
    setAudioCaptureVolume Set the capturing volume of local audio
    getAudioCaptureVolume Get the capturing volume of local audio
    setAudioPlayoutVolume Set the playback volume of remote audio
    getAudioPlayoutVolume Get the playback volume of remote audio
    enableAudioVolumeEvaluation Enable volume reminder
    startAudioRecording Start audio recording
    stopAudioRecording Stop audio recording
    startLocalRecording Start local media recording
    stopLocalRecording Stop local media recording
    checkAudioCapabilitySupport Query whether a certain audio capability is supported (only for Android)

    Device management APIs

    getDeviceManager Get device management class (TXDeviceManager)

    Beauty filter and watermark APIs

    getBeautyManager Get beauty filter management class (TXBeautyManager)
    setWatermark Add watermark

    Background music and sound effect APIs

    getAudioEffectManager Get sound effect management class (TXAudioEffectManager)

    Screen sharing APIs

    startScreenCapture Start screen sharing
    stopScreenCapture Stop screen sharing
    pauseScreenCapture Pause screen sharing
    resumeScreenCapture Resume screen sharing
    setSubStreamEncoderParam Set the video encoding parameters of screen sharing (i.e., substream) (for desktop systems only)

    Custom capturing and rendering APIs

    enableCustomVideoCapture Enable/Disable custom video capturing mode
    sendCustomVideoData Deliver captured video frames to SDK
    enableCustomAudioCapture Enable custom audio capturing mode
    sendCustomAudioData Deliver captured audio data to SDK
    enableMixExternalAudioFrame Enable/Disable custom audio track
    mixExternalAudioFrame Mix custom audio track into SDK
    setMixExternalAudioVolume Set the publish volume and playback volume of mixed custom audio track
    generateCustomPTS Generate custom capturing timestamp
    setLocalVideoProcessListener Set video data callback for third-party beauty filters
    setLocalVideoRenderListener Set the callback of custom rendering for local video
    setRemoteVideoRenderListener Set the callback of custom rendering for remote video
    setAudioFrameListener Set custom audio data callback
    setCapturedRawAudioFrameCallbackFormat Set the callback format of original audio frames captured by local mic
    setLocalProcessedAudioFrameCallbackFormat Set the callback format of preprocessed local audio frames
    setMixedPlayAudioFrameCallbackFormat Set the callback format of audio frames to be played back by system
    enableCustomAudioRendering Enabling custom audio playback
    getCustomAudioRenderingFrame Getting playable audio data

    Custom message sending APIs

    sendCustomCmdMsg Use UDP channel to send custom message to all users in room
    sendSEIMsg Use SEI channel to send custom message to all users in room

    Network test APIs

    startSpeedTest Start network speed test (used before room entry)
    stopSpeedTest Stop network speed test

    Debugging APIs

    getSDKVersion Get SDK version information
    setLogLevel Set log output level
    setConsoleEnabled Enable/Disable console log printing
    setLogCompressEnabled Enable/Disable local log compression
    setLogDirPath Set local log storage path
    setLogListener Set log callback
    showDebugView Display dashboard
    setDebugViewMargin Set dashboard margin
    callExperimentalAPI Call experimental APIs
    setNetEnv Set TRTC backend cluster (for use by Tencent Cloud R&D team only)

    Disused APIs

    setMicVolumeOnMixing Set mic volume
    setBeautyStyle Set the strength of beauty, brightening, and rosy skin filters
    setEyeScaleLevel Set the strength of eye enlarging filter
    setFaceSlimLevel Set the strength of face slimming filter
    setFaceVLevel Set the strength of chin slimming filter
    setChinLevel Set the strength of chin lengthening/shortening filter
    setFaceShortLevel Set the strength of face shortening filter
    setNoseSlimLevel Set the strength of nose slimming filter
    selectMotionTmpl Set animated sticker
    setMotionMute Mute animated sticker
    setFilter Set color filter
    setFilterConcentration Set the strength of color filter
    setGreenScreenFile Set green screen video
    playBGM Start background music
    stopBGM Stop background music
    pauseBGM Stop background music
    resumeBGM Stop background music
    getBGMDuration Get the total length of background music in ms
    setBGMPosition Set background music playback progress
    setBGMVolume Set background music volume
    setBGMPlayoutVolume Set the local playback volume of background music
    setBGMPublishVolume Set the remote playback volume of background music
    setReverbType Set reverb effect
    setVoiceChangerType Set voice changing type
    playAudioEffect Play sound effect
    setAudioEffectVolume Set sound effect volume
    setAudioEffectVolume Stop sound effect
    stopAllAudioEffects Stop all sound effects
    setAllAudioEffectsVolume Set the volume of all sound effects
    pauseAudioEffect Pause sound effect
    resumeAudioEffect Pause sound effect
    enableAudioEarMonitoring Enable or disable in-ear monitoring
    startRemoteView Start displaying remote video image
    stopRemoteView Stop displaying remote video image and pulling the video data stream of remote user
    setRemoteViewFillMode Set the rendering mode of remote image
    setRemoteViewRotation Set the clockwise rotation angle of remote image
    setLocalViewFillMode Set the rendering mode of local image
    setLocalViewRotation Set the clockwise rotation angle of local image
    setLocalViewMirror Set the mirror mode of local camera's preview image
    startRemoteSubStreamView Start displaying the substream image of remote user
    stopRemoteSubStreamView Stop displaying the substream image of remote user
    setRemoteSubStreamViewFillMode Set the fill mode of substream image
    setRemoteSubStreamViewRotation Set the clockwise rotation angle of substream image
    setPriorRemoteVideoStreamType Specify whether to view the big or small image
    setAudioQuality Set sound quality
    startLocalAudio Set sound quality
    switchCamera Switch camera
    isCameraZoomSupported Query whether the current camera supports zoom
    setZoom Set camera zoom ratio (focal length)
    isCameraTorchSupported Query whether the device supports flash
    enableTorch Enable/Disable flash
    isCameraFocusPositionInPreviewSupported Query whether the camera supports setting focus
    setFocusPosition Set the focal position of camera
    isCameraAutoFocusFaceModeSupported Query whether the device supports the automatic recognition of face position
    setSystemVolumeType Setting the system volume type (for mobile OS)
    enableCustomVideoCapture Enable custom video capturing mode
    sendCustomVideoData Deliver captured video data to SDK
    startScreenCapture Start screen sharing
    muteLocalVideo Pause/Resume publishing local video stream
    muteRemoteVideoStream Pause/Resume subscribing to remote user's video stream

    Error and warning events

    onError Error event callback
    onWarning Warning event callback

    Room event callback

    onEnterRoom Whether room entry is successful
    onExitRoom Room exit
    onSwitchRole Role switching
    onSwitchRoom Result of room switching
    onConnectOtherRoom Result of requesting cross-room call
    onDisConnectOtherRoom Result of ending cross-room call

    User event callback

    onRemoteUserEnterRoom A user entered the room
    onRemoteUserLeaveRoom A user exited the room
    onUserVideoAvailable A remote user published/unpublished primary stream video
    onUserSubStreamAvailable A remote user published/unpublished substream video
    onUserAudioAvailable A remote user published/unpublished audio
    onFirstVideoFrame The SDK started rendering the first video frame of the local or a remote user
    onFirstAudioFrame The SDK started playing the first audio frame of a remote user
    onSendFirstLocalVideoFrame The first local video frame was published
    onSendFirstLocalAudioFrame The first local audio frame was published
    onRemoteVideoStatusUpdated Change of remote video status

    Callback of statistics on network and technical metrics

    onNetworkQuality Real-time network quality statistics
    onStatistics Real-time statistics on technical metrics

    Callback of connection to the cloud

    onConnectionLost The SDK was disconnected from the cloud
    onTryToReconnect The SDK is reconnecting to the cloud
    onConnectionRecovery The SDK is reconnected to the cloud
    onSpeedTest Result of server speed testing

    Callback of hardware events

    onCameraDidReady The camera is ready
    onMicDidReady The mic is ready
    onAudioRouteChanged The audio route changed (for mobile devices only)
    onUserVoiceVolume Volume

    Callback of the receipt of a custom message

    onRecvCustomCmdMsg Receipt of custom message
    onMissCustomCmdMsg Loss of custom message
    onRecvSEIMsg Receipt of SEI message

    CDN event callback

    onStartPublishing Started publishing to Tencent Cloud CSS CDN
    onStopPublishing Stopped publishing to Tencent Cloud CSS CDN
    onStartPublishCDNStream Started publishing to non-Tencent Cloud’s live streaming CDN
    onStopPublishCDNStream Stopped publishing to non-Tencent Cloud’s live streaming CDN
    onSetMixTranscodingConfig Set the layout and transcoding parameters for On-Cloud MixTranscoding

    Screen sharing event callback

    onScreenCaptureStarted Screen sharing started
    onScreenCapturePaused Screen sharing was paused
    onScreenCaptureResumed Screen sharing was resumed
    onScreenCaptureStopped Screen sharing stopped

    Callback of local recording and screenshot events

    onLocalRecordBegin Local recording started
    onLocalRecording Local media is being recorded
    onLocalRecordComplete Local recording stopped

    Disused callbacks

    onUserEnter An anchor entered the room (disused)
    onUserExit An anchor left the room (disused)
    onAudioEffectFinished Audio effects ended (disused)

    Callback of custom video processing

    onRenderVideoFrame Custom video rendering
    onGLContextCreated An OpenGL context was created in the SDK.
    onProcessVideoFrame Video processing by third-party beauty filters
    onGLContextDestory The OpenGL context in the SDK was destroyed

    Callback of custom audio processing

    onCapturedRawAudioFrame Raw audio data captured locally
    onLocalProcessedAudioFrame Audio data captured by the local mic and pre-processed by the audio module
    onRemoteUserAudioFrame Audio data of each remote user before audio mixing
    onMixedPlayAudioFrame Data mixed from each channel before being submitted to the system for playback
    onMixedAllAudioFrame Data mixed from all the captured and to-be-played audio in the SDK

    Other event callbacks

    onLog Printing of local log

    Definitions of video enumerated values

    TRTCVideoResolution Video resolution
    TRTCVideoResolutionMode Video aspect ratio mode
    TRTCVideoStreamType Video stream type
    TRTCVideoFillMode Video image fill mode
    TRTCVideoRotation Video image rotation direction
    TRTCVideoPixelFormat Video pixel format
    TRTCVideoBufferType Video data transfer method
    TRTCVideoMirrorType Video mirror type
    TRTCSnapshotSourceType Data source of local video screenshot

    Definitions of network enumerated values

    TRTCAppScene Use cases
    TRTCRoleType Role
    TRTCQosControlMode QoS control mode (disused)
    TRTCVideoQosPreference Image quality preference
    TRTCQuality Network quality
    TRTCAVStatusType Audio/Video playback status
    TRTCAVStatusChangeReason Reasons for playback status changes

    Definitions of audio enumerated values

    TRTCAudioSampleRate Audio sample rate
    TRTCAudioQuality Sound quality
    TRTCAudioRoute Audio route (i.e., audio playback mode)
    TRTCReverbType Audio reverb mode
    TRTCVoiceChangerType Voice changing type
    TRTCAudioCapabilityType Audio capability type supported by the system (only for Android devices)

    Definitions of other enumerated values

    TRTCLogLevel Log level
    TRTCGSensorMode G-sensor switch (for mobile devices only)
    TRTCTranscodingConfigMode Layout mode of On-Cloud MixTranscoding
    TRTCRecordType Media recording type
    TRTCMixInputType Stream mix input type
    TRTCAudioRecordingContent Audio recording content type

    Definitions of core TRTC classes

    TRTCParams Room entry parameters
    TRTCVideoEncParam Video encoding parameters
    TRTCNetworkQosParam Network QoS control parameter set
    TRTCRenderParams Rendering parameters of video image
    TRTCQuality Network quality
    TRTCVolumeInfo Volume
    TRTCSpeedTestResult Network speed test result
    TRTCTexture Video texture data (for Android only and including texture ID and EGL environment)
    TRTCVideoFrame Video frame information
    TRTCAudioFrame Audio frame data
    TRTCMixUser Description information of each video image in On-Cloud MixTranscoding
    TRTCTranscodingConfig Layout and transcoding parameters of On-Cloud MixTranscoding
    TRTCPublishCDNParam Push parameters required to be set when publishing audio/video streams to non-Tencent Cloud CDN
    TRTCAudioRecordingParams Local audio file recording parameters
    TRTCLocalRecordingParams Local media file recording parameters
    TRTCAudioEffectParam Sound effect parameter (disused)
    TRTCSwitchRoomConfig Room switch parameter
    TRTCAudioFrameCallbackFormat Format parameter of custom audio callback