connectOtherRoom()
to successfully call anchor B in room 002, all users in room 001 will receive the onRemoteUserEnterRoom(B)
and onUserVideoAvailable(B,true)
callbacks, and all users in room 002 will receive the onRemoteUserEnterRoom(A)
and onUserVideoAvailable(A,true)
callbacks.roomId
: If anchor A in room 001 wants to call anchor B in room 002, he or she must set roomId
to 002
when calling ConnectOtherRoom()
.userId
: If anchor A in room 001 wants to call anchor B in room 002, he or she must set userId
to the user ID of anchor B when calling ConnectOtherRoom()
.onConnectOtherRoom()
callback.onDisconnectOtherRoom
callback.onUserVoiceVolume
callback. This API works only if it is called before startLocalAudio()
.onEnterRoom(result)
callback in TRTCCloudListener
.result
would be a positive number (result
> 0), indicating the time in milliseconds (ms) room entry took.result
would be a negative number (result
< 0), which represents the error code.exitRoom()
will trigger the execution of room exit-related logic, including releasing resources such as audio/video devices and codecs. After all the resources are released, the SDK will notify you via the onExitRoom()
callback.enterRoom()
again or switch to another RTC SDK, please wait until you receive the onExitRoom()
callback. Otherwise, you may encounter problems such as the camera or mic being occupied. The common issue of failure to switch between call volume and media volume on Android is caused by this problem.Get the capturing volume of the SDK
TXAudioEffectManager
TXAudioEffectManager
Get the playback volume of the SDK
TXBeautyManager
TXBeautyManager
TXDeviceManager
Version number
enterRoom
, and mute
will be reset to False
after exitRoom
.onUserAudioAvailable(userId, false)
callback notification. After local audio is unmuted, other members in the room will receive the onUserAudioAvailable(userId, true)
callback notification.stopLocalAudio
, muteLocalAudio(true)
does not stop the publishing of audio or video data. Data packets continue to be sent, although without audio and at extremely low bitrate. As MP4 and other video formats have high requirements on audio continuity, an MP4 recording file may not be played smoothly if stopLocalAudio
is used. muteLocalAudio
has less impact on the compatibility of MP4 recording files. Therefore, you are advised to use muteLocalAudio
in scenarios with high requirements on recording quality.onUserVideoAvailable(userId, false)
callback. After you resume publishing local video, other users in the room will receive the onUserVideoAvailable(userId, true)
callback.enterRoom
, and mute
will be reset to False
after exitRoom
.Register an event listener
startRemoteView
, video data will be automatically canceled after the timeout period elapses. If your application scenario involves only audio (e.g., audio chat), you can use this API to disable automatic video data receiving./app directory/files/log/tencent/liteav/
by default. To change the path, call this API before calling others. Make sure that the directory exists and your app has read/write access to the directory.setMixTranscodingConfig()
API, the SDK will send a command to the Tencent Cloud transcoding server to mix multiple audio/video streams in the room into one stream. You can use the mixUsers
parameter to set the position of each video and specify whether to mix only audio. You can also set the encoding parameters of the mixed stream, including videoWidth
, videoHeight
, and videoBitrate
.config
is not empty, On-Cloud MixTranscoding will start. If config
is empty, On-Cloud MixTranscoding will stop. For more information, see the description of TRTCTranscodingConfig
.rect
, which is in the format of (x, y, width, height)
.rect
to (0.1, 0.1, 0.2, 0.0)
, then the coordinates of the top-left corner of the watermark will be (540 × 0.1, 960 × 0.1) or (54, 96), and the width of the watermark will be 540 × 0.2 or 108 px. The height of the watermark will be calculated based on the watermark image’s aspect ratio.x
, y
, width
, and height
is 0-1.streamType
to different values each time.exitRoom
is called, audio recording will stop automatically.0
: Recording successful. -1
: Recording has started. -2
: Failed to create the file or directory. -3
: Unsupported audio format. -1001
: Invalid parameter.
startPublishing()
, but startPublishCDNStream()
supports relaying to the live streaming CDN of a non-Tencent Cloud vendor.TRTCPublishCDNParam
.startPublishing()
to bind Tencent Cloud’s live streaming CDN does not incur fees, but using startPublishCDNStream()
to bind the live streaming CDN of a non-Tencent Cloud vendor incurs relaying fees.StreamId
for the current user in Tencent Cloud’s CDN, which is used to splice the CDN playback address of the user.StreamId
of the current user's primary stream to user_stream_001
, the CDN playback address of the user’s primary stream will be http://yourdomain/live/user_stream_001.flv
, where yourdomain
is the domain name you use for playback. You can configure your playback domain name in the CSS console. Tencent Cloud doesn't provide a default playback domain name.streamId
when setting the TRTCParams
parameter of enterRoom
. This method is recommended.TRTCCloudListener.onSpeedTest
callback.exitRoom
is called, audio recording will stop automatically.onUserAudioAvailable(false)
callback.Stop relaying to non-Tencent Cloud address
Stop publishing stream to Tencent Cloud’s live streaming CDN
Stop server speed testing
TRTC_APP_SCENE_LIVE
and TRTC_APP_SCENE_VOICE_CHATROOM
)role
parameter in TRTCParams
. You can also call switchRole
to switch the role after room entry.onSwitchRoom(errCode, errMsg)
callback.Unregister all event listeners
Unregister an event listener
Terminate a TRTCCloud
singleton
Create a TRTCCloud
singleton
Generated using TypeDoc