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
TXDeviceManager
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.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 the application has read/write access to the directory.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 an event listener
Terminate a TRTCCloud
singleton
Create a TRTCCloud
singleton
Generated using TypeDoc