tencent cloud

Feedback

Overview

Last updated: 2022-02-23 10:22:06

    TRTCCloud

    Basic APIs

    API Description
    sharedInstance Creates a TRTCCloud singleton.
    destroySharedInstance Terminates a TRTCCloud singleton.
    registerListener Registers a listener.
    unRegisterListener Unregisters a listener.

    Room APIs

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

    CDN APIs

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

    Video APIs

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

    Audio APIs

    API Description
    startLocalAudio Enables local audio capturing and publishing.
    stopLocalAudio Disables local audio capturing and publishing.
    muteLocalAudio Mutes/Unmutes the local user.
    setAudioRoute Sets the audio route.
    muteRemoteAudio Mutes/Unmutes a remote user.
    muteAllRemoteAudio Mutes/Unmutes all remote users.
    setAudioCaptureVolume Sets the SDK capturing volume.
    getAudioCaptureVolume Gets the SDK capturing volume.
    setAudioPlayoutVolume Sets the SDK playback volume.
    getAudioPlayoutVolume Gets the SDK playback volume.
    enableAudioVolumeEvaluation Enables the volume reminder.
    startAudioRecording Starts audio recording.
    stopAudioRecording Stops audio recording.

    Device management APIs

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

    Beauty filter APIs

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

    Music and audio effect APIs

    API Description
    getAudioEffectManager 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
    startSpeedTest Starts network speed testing, which should be avoided during video calls to ensure call quality.
    stopSpeedTest Stops server speed testing.

    Log APIs

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

    TRTCCloudListener

    TRTC callback APIs

    Error and warning event callback APIs

    API Description
    onError 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.
    onWarning Warning callback. This callback alerts you to non-serious problems such as stutter or recoverable decoding failure.

    Room event callback APIs

    API Description
    onEnterRoom Callback for room entry
    onExitRoom Callback for room exit
    onSwitchRole Callback for role switching
    onConnectOtherRoom Callback of the result of requesting a cross-room call (anchor competition)
    onDisConnectOtherRoom Callback of the result of ending a cross-room call (anchor competition)
    onSwitchRoom Callback of the result of room switching (switchRoom)

    User event callback APIs

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

    Callback APIs for background music playback

    Callback APIs for background music playback

    API Description
    onMusicObserverStart Callback for starting music
    onMusicObserverPlayProgress Callback of the music playback progress
    onMusicObserverComplete Callback for ending music

    Callback APIs for statistics on network quality and technical metrics

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

    Server event callback APIs

    API Description
    onConnectionLost Callback for the disconnection of the SDK from the server
    onTryToReconnect Callback for the SDK trying to reconnect to the server
    onConnectionRecovery Callback for the reconnection of the SDK to the server
    onSpeedTest 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
    onCameraDidReady Callback for the camera being ready
    onMicDidReady Callback for the mic being ready
    onUserVoiceVolume Callback of volume, including the volume of each userId and the total remote volume

    Callback APIs for CDN relayed push

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

    Definitions of Key Types

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

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support