RoomID
in TRTC? What is its value range?A RoomID
(room ID) uniquely identifies a room and can range from 1 to 4294967295. You are responsible for maintaining and assigning the Room IDs of your applications.
UserID
in TRTC? What is its value range?A UserID
(user ID) uniquely identifies a user in a TRTC application. It can contain letters (case sensitive), digits, and underscores, preferably not longer than 32 bytes.
To enable instant streaming, TRTC subscribes users to audio/video streams by default upon room entry. You can call the setDefaultStreamRecvMode
API to switch to the manual subscription mode.
Yes. You can specify a streamId
via TRTCParams
of enterRoom
or call the startPublishing
API to pass in the streamId
.
The live streaming scenarios (TRTCAppSceneLIVE
and TRTCAppSceneVoiceChatRoom
) support two roles: TRTCRoleAnchor
(anchor) and TRTCRoleAudience
(audience). An anchor can both send and receive audio/video data, but audience can only receive and play back others' data. You can call switchRole()
to switch roles.
The concept of roles (anchors and audience) is applicable only in the live streaming scenarios. The anchor role (TRTCRoleAnchor
), which can be assigned to 50 users at the same time, can both send and receive audio/video, and the audience role (TRTCRoleAudience
), which can be assigned to 100,000 users at the same time, can only receive audio/video.
The following application scenarios are supported:
TRTC supports platforms including iOS, Android, Windows (C++), Windows (C#), Unity, macOS, web, and Electron. For more information, please see Supported Platforms.
See Differences Among Editions.
Yes. For detailed instructions, see:
There can be up to 4,294,967,294 concurrent rooms in TRTC. No limits are set on the number of non-concurrent rooms.
A room is automatically created by TRTC when a user enters a room. Therefore, you do not need to manually create a room. Just call the client API for room entry.
There isn’t a limit.
Private deployment of TRTC is not commercially available yet. If you have questions about it or want to use it, please contact us at colleenyu@tencent.com.
To enable relayed live streaming, according to the requirements of applicable authorities, the playback domain name needs an ICP filing before it can be used.
The average end-to-end delay of TRTC around the globe is less than 300 ms.
You can enable this feature using signaling channels. For example, you can use the custom message feature of IM to enable active calling. For more information, see the scenario-specific demos in the SDK source code.
Yes, you can.
Yes, you can.
Yes. For details, see the following documents:
For more information on the screen sharing APIs, please see Client APIs > All Platforms (C++) > Overview or Client APIs > Electron > Overview.
Yes. You can achieve this using the Custom Capturing and Rendering feature.
Recording files cannot be stored locally on phones. They are stored in VOD by default. You can download and save them to your phone.
Yes, it does.
Currently, only one screen sharing substream is allowed in a room.
SourceTypeWindow
), if the window size changes, will the resolution of the video stream change accordingly?By default, the SDK automatically adjusts encoding parameters according to the size of the shared window.
If you want a fixed resolution, call the setSubStreamEncoderParam
API to set encoding parameters for screen sharing or specify the parameters when calling the startScreenCapture
API.
Yes. You can set the resolution through setVideoEncoderParam
, the video encoding parameter of the SDK.
You can on some platforms. For details, see Custom Capture and Rendering.
No, it's not.
TRTC and MLVB have different backend architectures and therefore cannot communicate with each other. Relayed push from TRTC to CDNs is possible though.
AppScene
) vary from one another in TRTC?TRTC has four room entry modes. Video call (VideoCall
) and audio call (·VoiceCall) are the call modes, and interactive video live streaming (
Live) and interactive audio live streaming (
VoiceChatRoom`) are the live streaming modes.
Yes. You can enable the hands-free mode by setting audio routes. In a native SDK, use the setAudioRoute
API to switch routes.
Yes. You can call the enableAudioVolumeEvaluation
API to enable volume reminders.
Yes. You can call the setLocalViewMirror
API to set the mirroring mode for the preview image of the local camera or call setVideoEncoderMirror
to set the mirroring mode for encoded images.
Yes. You can call startAudioRecording
to record all the audio of a call, including that of the local user, remote users and the background music, into a single file in the format of PCM, WAV, or AAC.
TRTC supports audio/video recording on a local server. To use this feature, please submit a ticket for the SDK and instructions.
These features are part of UI design, for which the TRTC SDK sets no restrictions. The official demo provides sample code for image floating and the grid layout and supports floating windows, switching between big and small images, and dragging images. For more information, see the official demo.
TRTC does not use separate channels for audio and video. You can make an audio-only call by calling only startLocalAudio
but not `startLocalPreview.
json{\"Str_uc_params\":{\"pure_audio_push_mod\":1}}
and pass it in TRTCParams.businessInfo
during room entry. 1
means relayed push, and 2
means relayed push and recording.TRTCAppSceneAudioCall
or TRTCAppSceneVoiceChatRoom
during room entry.Yes, you can.
sendCustomCmdMsg
, the custom signaling API of TRTC, to define your own control signaling, and users who receive the message will perform the action expected. For example, to kick out a user, just define a kick-out signaling, and the user receiving it will exit the room.Yes. The TRTC SDK has integrated TXLivePlayer. If you need more player features, consider using the all-featured LiteAVSDK_Professional.
TRTC offers a dedicated low-latency interactive live streaming solution that allows up to 100,000 participants with co-anchoring latency kept as low as 200 ms and watch latency below 1s. It adapts excellently to poor network conditions and is optimized for the complicated mobile network environments.
For detailed directions, please see Live Streaming Mode.
No. Custom message sending is intended for simple and low-frequency signaling scenarios. For details, see Sending Custom Messages > Use Limits.
Yes. You can call the playback API again in the completion callback to loop background music, and call setBGMPosition()
to set the playback progress.
Note:
setBGMPosition()
has been replaced withTXAudioEffectManager seekMusicToPosInMS
since version 7.3.
onUserEnter
or onUserExit
?Yes. You can use onRemoteUserEnterRoom
and onRemoteUserLeaveRoom
to listen for the entry/exit of users, but callbacks are triggered only for users who can send data.
Note:
onUserEnter
andonUserExit
have been replaced withonRemoteUserEnterRoom
andonRemoteUserLeaveRoom
since version 6.8.
You can listen for the events through the following callbacks:
onConnectionLost
: the SDK is disconnected from the server.onTryToReconnect
: the SDK tries to reconnect to the server.onConnectionRecovery
: the SDK is reconnected to the server.The SDK supports the unlimited reconnection mechanism for user disconnection. The specific connection status and processing logic during reconnection are as detailed below:
The following figure shows the listening callback events received between when user Userid1
joins a channel and when the user is disconnected and joins the room again:
Description:
enterRoom
API to initiate a room entry request.onEnterRoom
callback is received.onConnectionLost
disconnection callback will be received.onTryToReconnect
reconnection callback will be received once every 3 seconds.onTryToReconnect
retry callback will be received once every 24 seconds.onConnectionRecovery
recovery callback will be received.Yes. You can use onFirstVideoFrame
and onFirstAudioFrame
to listen for the events.
Currently, you can call snapshotVideo()
on iOS and Android to take screenshots of local and remote videos.
Currently, TRTC supports mainstream Bluetooth earphones and peripherals, but for some devices, there are still compatibility issues. We recommend that you use our official demos and QQ audio/video calls to test the compatibility of a device.
You can call the onStatistics()
API of the SDK to get the statistics.
playBGM()
support online music?No. Currently, it supports only local music. You can download an online music file and then call playBGM()
to play it back.
Yes. You can call setAudioCaptureVolume()
to set the audio capturing volume of the SDK and setRemoteAudioVolume()
to set the playback volume of a remote user.
stopLocalPreview
and muteLocalVideo
?stopLocalPreview
is used to stop local video capturing. If you call this API, both you and other users will not be able to see your image.muteLocalVideo
is used to stop the sending of local video images. If you call this API, other users will not see your image, but you can still preview your own image.stopLocalAudio
and muteLocalAudio
?stopLocalAudio
is used to disable the capturing and sending of local audio.muteLocalAudio
is called, TRTC does not stop the sending of audio/video data. It continues to send muted data packets at extremely low bitrate.We recommend that you set the resolution as instructed in Setting Image Quality for better image quality.
Call the setVideoEncoderParam()
API of TRTCCloud
and set videoResolution
(resolution), videoFps
(frame rate), and videoBitrate
(bitrate) in TRTCVideoEncParam
.
Please see Video Image Rotation and Zooming.
For more information, please see Video Image Rotation and Zooming.
Please see Video Image Rotation and Zooming.
See Setting Image Quality > Recommended Configuration.
Yes, you can. For details, see Testing Network Speed Before Chat.
Yes. For details, please see Enabling Advanced Permission Control.
Tencent Real-Time Communication (TRTC) leverages Tencent's years of experience in network and audio/video technologies to offer group audio/video calls and low-latency interactive live streaming solutions, allowing you to quickly develop cost-effective, low-latency, and high-quality interactive audio/video services. For details, please see Product Introduction > Overview.
Please see Free Demo.
TRTC offers demo source code for different platforms to allow you to quickly build your own apps. For details, please see User Tutorial.
Please see On-Cloud Recording and Playback.
Server-side recording relies on the SDK for Linux, which is not commercially available yet. If you have questions about the SDK or want to use it, please contact us at colleenyu@tencent.com.
Was this page helpful?