Packages | |
package | com.tencent.trtc |
Data Structures | |
class | TRTCCloudDef.TRTCParams |
class | TRTCCloudDef.TRTCVideoEncParam |
class | TRTCCloudDef.TRTCNetworkQosParam |
class | TRTCCloudDef.TRTCRenderParams |
class | TRTCCloudDef.TRTCQuality |
class | TRTCCloudDef.TRTCVolumeInfo |
class | TRTCCloudDef.TRTCSpeedTestParams |
class | TRTCCloudDef.TRTCSpeedTestResult |
class | TRTCCloudDef.TRTCTexture |
class | TRTCCloudDef.TRTCVideoFrame |
class | TRTCCloudDef.TRTCAudioFrame |
class | TRTCCloudDef.TRTCMixUser |
class | TRTCCloudDef.TRTCTranscodingConfig |
class | TRTCCloudDef.TRTCPublishCDNParam |
class | TRTCCloudDef.TRTCAudioRecordingParams |
class | TRTCCloudDef.TRTCLocalRecordingParams |
class | TRTCCloudDef.TRTCAudioEffectParam |
class | TRTCCloudDef.TRTCSwitchRoomConfig |
class | TRTCCloudDef.TRTCAudioFrameCallbackFormat |
class | TRTCCloudDef.TRTCScreenShareParams |
class | TRTCCloudDef.TRTCAudioParallelParams |
class | TRTCCloudDef |
Tencent Cloud TRTC Key Type Definition.
Module: TRTC key class definition Description: definitions of interfaceerated and constant values such as resolution and quality level
class com::tencent::trtc::TRTCCloudDef::TRTCParams |
Room entry parameters
As the room entry parameters in the TRTC SDK, these parameters must be correctly set so that the user can successfully enter the audio/video room specified by roomId
or strRoomId
. For historical reasons, TRTC supports two types of room IDs: roomId
and strRoomId
. Note: do not mix roomId
and strRoomId
, because they are not interchangeable. For example, the number 123
and the string 123
are two completely different rooms in TRTC.
Public Member Functions | |
TRTCParams () | |
TRTCParams (int sdkAppId, String userId, String userSig, int roomId, String privateMapKey, String businessInfo) | |
TRTCParams (int sdkAppId, String userId, String userSig, String strRoomId, String privateMapKey, String businessInfo) | |
TRTCParams (TRTCParams original) | |
Data Fields | |
int | sdkAppId = 0 |
String | userId = "" |
String | userSig = "" |
int | roomId = 0 |
String | strRoomId = "" |
int | role = TRTCCloudDef.TRTCRoleAnchor |
String | streamId |
String | userDefineRecordId |
String | privateMapKey = "" |
String | businessInfo = "" |
|
inline |
|
inline |
|
inline |
|
inline |
String businessInfo = "" |
String privateMapKey = "" |
int role = TRTCCloudDef.TRTCRoleAnchor |
int roomId = 0 |
int sdkAppId = 0 |
String streamId |
String strRoomId = "" |
String userDefineRecordId |
String userId = "" |
String userSig = "" |
class com::tencent::trtc::TRTCCloudDef::TRTCVideoEncParam |
Video encoding parameters
These settings determine the quality of image viewed by remote users as well as the image quality of recorded video files in the cloud.
class com::tencent::trtc::TRTCCloudDef::TRTCNetworkQosParam |
class com::tencent::trtc::TRTCCloudDef::TRTCRenderParams |
class com::tencent::trtc::TRTCCloudDef::TRTCQuality |
class com::tencent::trtc::TRTCCloudDef::TRTCVolumeInfo |
class com::tencent::trtc::TRTCCloudDef::TRTCSpeedTestParams |
Network speed testing parameters
You can test the network speed through the startSpeedTest: interface before the user enters the room (this API cannot be called during a call).
Public Member Functions | |
String | toString () |
Data Fields | |
int | sdkAppId |
String | userId |
String | userSig |
int | expectedUpBandwidth |
int | expectedDownBandwidth |
|
inline |
int expectedDownBandwidth |
Expected downstream bandwidth (kbps, value range: 10 to 5000, no downlink bandwidth test when it is 0).
int expectedUpBandwidth |
Expected upstream bandwidth (kbps, value range: 10 to 5000, no uplink bandwidth test when it is 0).
int sdkAppId |
Application identification, please refer to the relevant instructions in TRTCParams.
String userId |
User identification, please refer to the relevant instructions in TRTCParams.
String userSig |
User signature, please refer to the relevant instructions in TRTCParams.
class com::tencent::trtc::TRTCCloudDef::TRTCSpeedTestResult |
Network speed test result
The startSpeedTest: API can be used to test the network speed before a user enters a room (this API cannot be called during a call).
Public Member Functions | |
String | toString () |
Data Fields | |
boolean | success |
String | errMsg |
String | ip |
int | quality |
float | upLostRate |
float | downLostRate |
int | rtt |
int | availableUpBandwidth |
int | availableDownBandwidth |
|
inline |
int availableDownBandwidth |
Downstream bandwidth (in kbps, -1: invalid value).
int availableUpBandwidth |
Upstream bandwidth (in kbps, -1: invalid value).
float downLostRate |
Downstream packet loss rate between 0 and 1.0. For example, 0.2 indicates that 2 data packets may be lost in every 10 packets received from the server.
String errMsg |
Error message for network speed test.
String ip |
Server IP address.
int quality |
Network quality, which is tested and calculated based on the internal evaluation algorithm. For more information, please see TRTCQuality.
int rtt |
Delay in milliseconds, which is the round-trip time between the current device and TRTC server. The smaller the value, the better. The normal value range is 10–100 ms.
boolean success |
Whether the network speed test is successful.
float upLostRate |
Upstream packet loss rate between 0 and 1.0. For example, 0.3 indicates that 3 data packets may be lost in every 10 packets sent to the server.
class com::tencent::trtc::TRTCCloudDef::TRTCTexture |
Video texture data (for Android only and including texture ID and EGL environment)
class com::tencent::trtc::TRTCCloudDef::TRTCVideoFrame |
Video frame information
TRTCVideoFrame
is used to describe the raw data of a frame of the video image, which is the image data before frame encoding or after frame decoding.
Data Fields | ||
---|---|---|
int | height | |
long | timestamp | |
int | width |
Field description:** video pixel format public int pixelFormat; /**Field description:** video data structure type public int bufferType; /**Field description:** video data when /**Field description:** video data when /**Field description:** video data when /****Field description:** video width Recommended value: please enter the width of the video data passed in. |
class com::tencent::trtc::TRTCCloudDef::TRTCAudioFrame |
Audio frame data
class com::tencent::trtc::TRTCCloudDef::TRTCMixUser |
Description information of each video image in On-Cloud MixTranscoding
TRTCMixUser
is used to specify the location, size, layer, and stream type of each video image in On-Cloud MixTranscoding.
Public Member Functions | |
TRTCMixUser () | |
TRTCMixUser (String userId, int x, int y, int width, int height, int zOrder) | |
TRTCMixUser (TRTCMixUser original) | |
String | toString () |
Data Fields | |
boolean | pureAudio |
int | inputType |
int | renderMode |
String | image |
|
inline |
|
inline |
|
inline |
|
inline |
String image |
int inputType |
boolean pureAudio |
Field description:** user ID public String userId;
/**Field description:** ID of the room where this audio/video stream is located (an empty value indicates the local room ID) public String roomId;
/**Field description:** specify the X coordinate of this video image in px public int x;
/**Field description:** specify the Y coordinate of this video image in px public int y;
/**Field description:** specify the width of this video image in px public int width;
/**Field description:** specify the height of this video image in px public int height;
/**Field description:** specify the level of this video image (value range: 1–15; the value must be unique) public int zOrder;
/**Field description:** specify whether this video image is the primary stream image (TRTCVideoStreamTypeBig) or substream image (TRTCVideoStreamTypeSub). public int streamType;
/****Field description:** specify whether this stream mixes audio only Recommended value: default value: false Note: this field has been disused. We recommend you use the new field inputType
introduced in v8.5.
int renderMode |
class com::tencent::trtc::TRTCCloudDef::TRTCTranscodingConfig |
Layout and transcoding parameters of On-Cloud MixTranscoding
These parameters are used to specify the layout position information of each video image and the encoding parameters of mixtranscoding during On-Cloud MixTranscoding.
Public Member Functions | |
TRTCTranscodingConfig () | |
TRTCTranscodingConfig (TRTCTranscodingConfig original) | |
String | toString () |
Data Fields | |
int | mode |
int | appId |
int | bizId |
int | videoWidth |
int | videoHeight |
int | videoBitrate |
int | videoFramerate |
int | videoGOP |
int | backgroundColor |
String | backgroundImage |
int | audioSampleRate |
int | audioBitrate |
int | audioChannels |
int | audioCodec |
ArrayList< TRTCMixUser > | mixUsers |
String | streamId |
|
inline |
|
inline |
|
inline |
int appId |
int audioBitrate |
int audioChannels |
int audioCodec |
int audioSampleRate |
int backgroundColor |
String backgroundImage |
int bizId |
ArrayList<TRTCMixUser> mixUsers |
int mode |
String streamId |
int videoBitrate |
int videoFramerate |
int videoGOP |
int videoHeight |
int videoWidth |
class com::tencent::trtc::TRTCCloudDef::TRTCPublishCDNParam |
Push parameters required to be set when publishing audio/video streams to non-Tencent Cloud CDN
TRTC's backend service supports publishing audio/video streams to third-party live CDN service providers through the standard RTMP protocol. If you use the Tencent Cloud CSS CDN service, you don't need to care about this parameter; instead, just use the startPublish API.
Data Fields | ||
---|---|---|
int | appId | |
int | bizId | |
String | streamId | |
String | url |
class com::tencent::trtc::TRTCCloudDef::TRTCAudioRecordingParams |
Local audio file recording parameters
This parameter is used to specify the recording parameters in the audio recording API startAudioRecording.
Data Fields | ||
---|---|---|
String | filePath | |
int | recordingContent |
class com::tencent::trtc::TRTCCloudDef::TRTCLocalRecordingParams |
Local media file recording parameters
This parameter is used to specify the recording parameters in the local media file recording API startLocalRecording. The startLocalRecording
API is an enhanced version of the startAudioRecording
API. The former can record video files, while the latter can only record audio files.
Data Fields | ||
---|---|---|
String | filePath |
class com::tencent::trtc::TRTCCloudDef::TRTCAudioEffectParam |
Sound effect parameter (disused)
"Sound effects" in TRTC refer to some short audio files (usually only a few seconds), such as "applause" and "laughter". This parameter is used to specify the path and number of playback times of a sound effect file (short audio file) in the sound effect playback API TRTCCloud#playAudioEffect on legacy versions. After v7.3, the sound effect API has been replaced by a new TXAudioEffectManager#startPlayMusic API. When you specify the TXAudioMusicParam parameter of startPlayMusic
, if isShortFile
is set to true
, the file is a "sound effect" file.
Public Member Functions | |
TRTCAudioEffectParam (int effectId, String path) | |
Data Fields | |
int | effectId |
int | loopCount |
boolean | publish |
int | volume |
|
inline |
int effectId |
int loopCount |
Field description:** sound effect file path. Supported file formats include AAC, MP3, and M4A. public String path;
/****Field description:** number of times the sound effect is looped Valid values: 0 or any positive integer. 0 (default) indicates that the sound effect is played once, 1 twice, and so on.
boolean publish |
int volume |
class com::tencent::trtc::TRTCCloudDef::TRTCSwitchRoomConfig |
Room switch parameter
This parameter is used for the room switch API switchRoom, which can quickly switch a user from one room to another.
Public Member Functions | |
TRTCSwitchRoomConfig () | |
Data Fields | |
int | roomId |
String | strRoomId |
String | userSig |
String | privateMapKey |
|
inline |
String privateMapKey |
int roomId |
String strRoomId |
String userSig |
class com::tencent::trtc::TRTCCloudDef::TRTCAudioFrameCallbackFormat |
Format parameter of custom audio callback
This parameter is used to set the relevant format (including sample rate and number of channels) of the audio data called back by the SDK in the APIs related to custom audio callback.
Public Member Functions | |
TRTCAudioFrameCallbackFormat () | |
Data Fields | |
int | sampleRate |
int | channel |
int | samplesPerCall |
|
inline |
int channel |
int sampleRate |
int samplesPerCall |
class com::tencent::trtc::TRTCCloudDef::TRTCScreenShareParams |
Screen sharing parameter (for Android only)
This parameter is used to specify the floating window and other related information during screen sharing in the screen sharing API startScreenCapture.
Data Fields | ||
---|---|---|
View | floatingView |
class com::tencent::trtc::TRTCCloudDef::TRTCAudioParallelParams |
parameter of the parallel strategy of remote audio streams
This parameter is used to set the parallel strategy of remote audio streams.
Public Member Functions | |
TRTCAudioParallelParams () | |
Data Fields | |
int | maxCount |
ArrayList< String > | includeUsers |
|
inline |
ArrayList<String> includeUsers |
int maxCount |
class com::tencent::trtc::TRTCCloudDef |
Static Public Attributes | |
static final String | TRTC_SDK_VERSION = "0.0.0.0" |
TRTCVideoResolution | |
[VIEW] Rendering control that renders the video image There are many APIs in TRTC that need to manipulate the video image, for which you should specify the video rendering control. On Android, you can use the
If you want to force the use of a certain scheme, you can write the code as follows: Usage 1. Force the use of TXCloudVideoView localView = findViewById(R.id.trtc_tc_cloud_view_main); localView.addVideoView(new TextureView(context)); mTRTCCloud.startLocalPreview(true, localView); Usage 2. Force the use of SurfaceView surfaceView = new SurfaceView(this); TXCloudVideoView localView = new TXCloudVideoView(surfaceView); mTRTCCloud.startLocalPreview(true, localView); Video resolution Here, only the landscape resolution (e.g., 640x360) is defined. If the portrait resolution (e.g., 360x640) needs to be used, | |
static final int | TRTC_VIDEO_RESOLUTION_120_120 = 1 |
static final int | TRTC_VIDEO_RESOLUTION_160_160 = 3 |
static final int | TRTC_VIDEO_RESOLUTION_270_270 = 5 |
static final int | TRTC_VIDEO_RESOLUTION_480_480 = 7 |
static final int | TRTC_VIDEO_RESOLUTION_160_120 = 50 |
static final int | TRTC_VIDEO_RESOLUTION_240_180 = 52 |
static final int | TRTC_VIDEO_RESOLUTION_280_210 = 54 |
static final int | TRTC_VIDEO_RESOLUTION_320_240 = 56 |
static final int | TRTC_VIDEO_RESOLUTION_400_300 = 58 |
static final int | TRTC_VIDEO_RESOLUTION_480_360 = 60 |
static final int | TRTC_VIDEO_RESOLUTION_640_480 = 62 |
static final int | TRTC_VIDEO_RESOLUTION_960_720 = 64 |
static final int | TRTC_VIDEO_RESOLUTION_160_90 = 100 |
static final int | TRTC_VIDEO_RESOLUTION_256_144 = 102 |
static final int | TRTC_VIDEO_RESOLUTION_320_180 = 104 |
static final int | TRTC_VIDEO_RESOLUTION_480_270 = 106 |
static final int | TRTC_VIDEO_RESOLUTION_640_360 = 108 |
static final int | TRTC_VIDEO_RESOLUTION_960_540 = 110 |
static final int | TRTC_VIDEO_RESOLUTION_1280_720 = 112 |
static final int | TRTC_VIDEO_RESOLUTION_1920_1080 = 114 |
TRTCVideoResolutionMode | |
Only the landscape resolution (e.g., 640x360) is defined in | |
static final int | TRTC_VIDEO_RESOLUTION_MODE_LANDSCAPE = 0 |
static final int | TRTC_VIDEO_RESOLUTION_MODE_PORTRAIT = 1 |
TRTCVideoStreamType | |
TRTC provides three different video streams, including:
| |
static final int | TRTC_VIDEO_STREAM_TYPE_BIG = 0 |
static final int | TRTC_VIDEO_STREAM_TYPE_SMALL = 1 |
static final int | TRTC_VIDEO_STREAM_TYPE_SUB = 2 |
static final int | TRTC_VIDEO_RENDER_MODE_FILL = 0 |
static final int | TRTC_VIDEO_RENDER_MODE_FIT = 1 |
TRTCVideoRotation | |
Video image rotation direction TRTC provides rotation angle setting APIs for local and remote images. The following rotation angles are all clockwise. | |
static final int | TRTC_VIDEO_ROTATION_0 = 0 |
static final int | TRTC_VIDEO_ROTATION_90 = 1 |
static final int | TRTC_VIDEO_ROTATION_180 = 2 |
static final int | TRTC_VIDEO_ROTATION_270 = 3 |
TRTCBeautyStyle | |
Beauty (skin smoothing) filter algorithm TRTC has multiple built-in skin smoothing algorithms. You can select the one most suitable for your product. | |
static final int | TRTC_BEAUTY_STYLE_SMOOTH = 0 |
static final int | TRTC_BEAUTY_STYLE_NATURE = 1 |
static final int | TRTC_BEAUTY_STYLE_PITU = 2 |
TRTCVideoPixelFormat | |
TRTC provides custom video capturing and rendering features.
| |
static final int | TRTC_VIDEO_PIXEL_FORMAT_UNKNOWN = 0 |
static final int | TRTC_VIDEO_PIXEL_FORMAT_I420 = 1 |
static final int | TRTC_VIDEO_PIXEL_FORMAT_Texture_2D = 2 |
static final int | TRTC_VIDEO_PIXEL_FORMAT_TEXTURE_EXTERNAL_OES = 3 |
static final int | TRTC_VIDEO_PIXEL_FORMAT_NV21 = 4 |
static final int | TRTC_VIDEO_PIXEL_FORMAT_RGBA = 5 |
TRTCVideoBufferType | |
For custom capturing and rendering features, you need to use the following interfaceerated values to specify the method of transferring video data:
| |
static final int | TRTC_VIDEO_BUFFER_TYPE_UNKNOWN = 0 |
static final int | TRTC_VIDEO_BUFFER_TYPE_BYTE_BUFFER = 1 |
static final int | TRTC_VIDEO_BUFFER_TYPE_BYTE_ARRAY = 2 |
static final int | TRTC_VIDEO_BUFFER_TYPE_TEXTURE = 3 |
TRTCVideoMirrorType | |
Video mirroring refers to the left-to-right flipping of the video image, especially for the local camera preview image. After mirroring is enabled, it can bring anchors a familiar "look into the mirror" experience. | |
static final int | TRTC_VIDEO_MIRROR_TYPE_AUTO = 0 |
static final int | TRTC_VIDEO_MIRROR_TYPE_ENABLE = 1 |
static final int | TRTC_VIDEO_MIRROR_TYPE_DISABLE = 2 |
TRTCAppScene | |
TRTC features targeted optimizations for common audio/video application scenarios to meet the differentiated requirements in various verticals. The main scenarios can be divided into the following two categories:
| |
static final int | TRTC_APP_SCENE_VIDEOCALL = 0 |
static final int | TRTC_APP_SCENE_LIVE = 1 |
static final int | TRTC_APP_SCENE_AUDIOCALL = 2 |
static final int | TRTC_APP_SCENE_VOICE_CHATROOM = 3 |
TRTCRoleType | |
Role is applicable only to live streaming scenarios (
| |
static final int | TRTCRoleAnchor = 20 |
static final int | TRTCRoleAudience = 21 |
TRTCQosControlMode | |
static final int | VIDEO_QOS_CONTROL_CLIENT = 0 |
static final int | VIDEO_QOS_CONTROL_SERVER = 1 |
TRTCVideoQosPreference | |
TRTC has two control modes in weak network environments: "ensuring clarity" and "ensuring smoothness". Both modes will give priority to the transfer of audio data. | |
static final int | TRTC_VIDEO_QOS_PREFERENCE_SMOOTH = 1 |
static final int | TRTC_VIDEO_QOS_PREFERENCE_CLEAR = 2 |
TRTCQuality | |
TRTC evaluates the current network quality once every two seconds. The evaluation results are divided into six levels: | |
static final int | TRTC_QUALITY_UNKNOWN = 0 |
static final int | TRTC_QUALITY_Excellent = 1 |
static final int | TRTC_QUALITY_Good = 2 |
static final int | TRTC_QUALITY_Poor = 3 |
static final int | TRTC_QUALITY_Bad = 4 |
static final int | TRTC_QUALITY_Vbad = 5 |
static final int | TRTC_QUALITY_Down = 6 |
TRTCAVStatusType | |
This interfaceerated type is used in the video status changed API onRemoteVideoStatusUpdated to specify the current video status. | |
static final int | TRTCAVStatusStopped = 0 |
static final int | TRTCAVStatusPlaying = 1 |
static final int | TRTCAVStatusLoading = 2 |
TRTCAVStatusChangeReason | |
Reasons for playback status changes This interfaceerated type is used in the video status changed API onRemoteVideoStatusUpdated to specify the reason for the current video status change. | |
static final int | TRTCAVStatusChangeReasonInternal = 0 |
static final int | TRTCAVStatusChangeReasonBufferingBegin = 1 |
static final int | TRTCAVStatusChangeReasonBufferingEnd = 2 |
static final int | TRTCAVStatusChangeReasonLocalStarted = 3 |
static final int | TRTCAVStatusChangeReasonLocalStopped = 4 |
static final int | TRTCAVStatusChangeReasonRemoteStarted = 5 |
static final int | TRTCAVStatusChangeReasonRemoteStopped = 6 |
TRTCAudioSampleRate | |
The audio sample rate is used to measure the audio fidelity. A higher sample rate indicates higher fidelity. If there is music in the use case, | |
static final int | TRTCAudioSampleRate16000 = 16000 |
static final int | TRTCAudioSampleRate32000 = 32000 |
static final int | TRTCAudioSampleRate44100 = 44100 |
static final int | TRTCAudioSampleRate48000 = 48000 |
TRTCAudioQuality | |
TRTC provides three well-tuned modes to meet the differentiated requirements for sound quality in various verticals:
| |
static final int | TRTC_AUDIO_QUALITY_SPEECH = 1 |
static final int | TRTC_AUDIO_QUALITY_DEFAULT = 2 |
static final int | TRTC_AUDIO_QUALITY_MUSIC = 3 |
TRTCAudioRoute | |
Audio route (i.e., audio playback mode) "Audio route" determines whether the sound is played back from the speaker or receiver of a mobile device; therefore, this API is applicable only to mobile devices such as phones. Generally, a phone has two speakers: one is the receiver at the top, and the other is the stereo speaker at the bottom.
| |
static final int | TRTC_AUDIO_ROUTE_SPEAKER = 0 |
static final int | TRTC_AUDIO_ROUTE_EARPIECE = 1 |
TRTCReverbType | |
This interfaceerated value is used to set the audio reverb mode in the live streaming scenario and is often used in show live streaming. | |
static final int | TRTC_REVERB_TYPE_0 = 0 |
static final int | TRTC_REVERB_TYPE_1 = 1 |
static final int | TRTC_REVERB_TYPE_2 = 2 |
static final int | TRTC_REVERB_TYPE_3 = 3 |
static final int | TRTC_REVERB_TYPE_4 = 4 |
static final int | TRTC_REVERB_TYPE_5 = 5 |
static final int | TRTC_REVERB_TYPE_6 = 6 |
static final int | TRTC_REVERB_TYPE_7 = 7 |
TRTCVoiceChangerType | |
This interfaceerated value is used to set the voice changing mode in the live streaming scenario and is often used in show live streaming. | |
static final int | TRTC_VOICE_CHANGER_TYPE_0 = 0 |
static final int | TRTC_VOICE_CHANGER_TYPE_1 = 1 |
static final int | TRTC_VOICE_CHANGER_TYPE_2 = 2 |
static final int | TRTC_VOICE_CHANGER_TYPE_3 = 3 |
static final int | TRTC_VOICE_CHANGER_TYPE_4 = 4 |
static final int | TRTC_VOICE_CHANGER_TYPE_5 = 5 |
static final int | TRTC_VOICE_CHANGER_TYPE_6 = 6 |
static final int | TRTC_VOICE_CHANGER_TYPE_7 = 7 |
static final int | TRTC_VOICE_CHANGER_TYPE_8 = 8 |
static final int | TRTC_VOICE_CHANGER_TYPE_9 = 9 |
static final int | TRTC_VOICE_CHANGER_TYPE_10 = 10 |
static final int | TRTC_VOICE_CHANGER_TYPE_11 = 11 |
TRTCSystemVolumeType | |
System volume type (only for mobile devices) Smartphones usually have two types of system volume: call volume and media volume.
| |
static final int | TRTCSystemVolumeTypeAuto = 0 |
static final int | TRTCSystemVolumeTypeMedia = 1 |
static final int | TRTCSystemVolumeTypeVOIP = 2 |
TRTCAudioFrameFormat | |
static final int | TRTC_AUDIO_FRAME_FORMAT_PCM = 1 |
TRTCAudioCapabilityType | |
Audio capability type supported by the system (only for Android devices) The SDK currently provides two types of system audio capabilities to query whether they are supported: low-latency chorus capability and low-latency earmonitor capability. | |
static final int | TRTCAudioCapabilityLowLatencyChorus = 1 |
static final int | TRTCAudioCapabilityLowLatencyEarMonitor = 2 |
TRTCLogLevel | |
Different log levels indicate different levels of details and number of logs. We recommend you set the log level to | |
static final int | TRTC_LOG_LEVEL_VERBOSE = 0 |
static final int | TRTC_LOG_LEVEL_DEBUG = 1 |
static final int | TRTC_LOG_LEVEL_INFO = 2 |
static final int | TRTC_LOG_LEVEL_WARN = 3 |
static final int | TRTC_LOG_LEVEL_ERROR = 4 |
static final int | TRTC_LOG_LEVEL_FATAL = 5 |
static final int | TRTC_LOG_LEVEL_NULL = 6 |
TRTCGSensorMode | |
static final int | TRTC_GSENSOR_MODE_DISABLE = 0 |
static final int | TRTC_GSENSOR_MODE_UIAUTOLAYOUT = 1 |
static final int | TRTC_GSENSOR_MODE_UIFIXLAYOUT = 2 |
TRTCTranscodingConfigMode | |
Layout mode of On-Cloud MixTranscoding TRTC's On-Cloud MixTranscoding service can mix multiple audio/video streams in the room into one stream. Therefore, you need to specify the layout scheme of the video images. The following layout modes are provided: | |
static final int | TRTC_TranscodingConfigMode_Unknown = 0 |
static final int | TRTC_TranscodingConfigMode_Manual = 1 |
static final int | TRTC_TranscodingConfigMode_Template_PureAudio = 2 |
static final int | TRTC_TranscodingConfigMode_Template_PresetLayout = 3 |
static final int | TRTC_TranscodingConfigMode_Template_ScreenSharing = 4 |
TRTCRecordType | |
This interfaceerated type is used in the local media recording API startLocalRecording to specify whether to record audio/video files or pure audio files. | |
static final int | TRTC_RECORD_TYPE_AUDIO = 0 |
static final int | TRTC_RECORD_TYPE_VIDEO = 1 |
static final int | TRTC_RECORD_TYPE_BOTH = 2 |
TRTCMixInputType | |
static final int | TRTC_MixInputType_Undefined = 0 |
static final int | TRTC_MixInputType_AudioVideo = 1 |
static final int | TRTC_MixInputType_PureVideo = 2 |
static final int | TRTC_MixInputType_PureAudio = 3 |
static final int | TRTC_MixInputType_Watermark = 4 |
TRTCDebugViewLevel | |
Do not display debugging information in the rendering control | |
static final int | TRTC_DEBUG_VIEW_LEVEL_GONE = 0 |
static final int | TRTC_DEBUG_VIEW_LEVEL_STATUS = 1 |
static final int | TRTC_DEBUG_VIEW_LEVEL_ALL = 2 |
TRTCAudioRecordingContent | |
This interfaceerated type is used in the audio recording API startAudioRecording to specify the content of the recorded audio. | |
static final int | TRTC_AudioRecordingContent_All = 0 |
static final int | TRTC_AudioRecordingContent_Local = 1 |
static final int | TRTC_AudioRecordingContent_Remote = 2 |
|
static |
Audio call scenario, where the SPEECH
sound quality is used by default. A single room can sustain up to 300 concurrent online users, and up to 50 of them can speak simultaneously. Use cases: [one-to-one audio call], [audio conferencing with up to 300 participants], [audio chat], [online Werewolf], etc.
|
static |
In the interactive video live streaming scenario, mic can be turned on/off smoothly without waiting for switchover, and the anchor latency is as low as less than 300 ms. Live streaming to hundreds of thousands of concurrent users in the audience role is supported with the playback latency down to 1,000 ms. Use cases: [low-latency interactive live streaming], [big class], [anchor competition], [video dating room], [online interactive classroom], [remote training], [large-scale conferencing], etc.
role
field in TRTCParams
to specify the role of the current user.
|
static |
In the video call scenario, 720p and 1080p HD image quality is supported. A single room can sustain up to 300 concurrent online users, and up to 50 of them can speak simultaneously. Use cases: [one-to-one video call], [video conferencing with up to 300 participants], [online medical diagnosis], [small class], [video interview], etc.
|
static |
In the interactive audio live streaming scenario, mic can be turned on/off smoothly without waiting for switchover, and the anchor latency is as low as less than 300 ms. Live streaming to hundreds of thousands of concurrent users in the audience role is supported with the playback latency down to 1,000 ms. Use cases: [audio club], [online karaoke room], [music live room], [FM radio], etc.
role
field in TRTCParams
to specify the role of the current user.
|
static |
Audio data in PCM format.
|
static |
Default mode: sample rate: 48 kHz; mono channel; bitrate: 50 Kbps. This mode is between the speech mode and the music mode as the default mode in the SDK and is recommended.
|
static |
Music mode: sample rate: 48 kHz; full-band stereo; bitrate: 128 Kbps. This mode is suitable for scenarios where Hi-Fi music transfer is required, such as online karaoke and music live streaming.
|
static |
Speech mode: sample rate: 16 kHz; mono channel; bitrate: 16 Kbps. This mode has the best resistance among all modes and is suitable for audio call scenarios, such as online meeting and audio call.
|
static |
Earpiece: the receiver at the top is used for playback. With relatively low volume, it is suitable for call scenarios that require privacy.
|
static |
Speakerphone: the speaker at the bottom is used for playback (hands-free). With relatively high volume, it is used to play music out loud.
|
static |
Record both local and remote audio.
|
static |
Record local audio only.
|
static |
Record remote audio only.
|
static |
Natural style, which retains more facial details for more natural effect and is suitable for most live streaming use cases.
|
static |
Pitu style, which is provided by YouTu Lab. Its skin smoothing effect is between the smooth style and the natural style, that is, it retains more skin details than the smooth style and has a higher skin smoothing degree than the natural style.
|
static |
Smooth style, which uses a more radical algorithm for more obvious effect and is suitable for show live streaming.
|
static |
Display audio/video statistics and key historical events in the rendering control.
|
static |
|
static |
Display audio/video statistics in the rendering control.
|
static |
Do not adapt to G-sensor orientation This mode is the default value for desktop platforms. In this mode, the video image published by the current user is not affected by the change of the G-sensor orientation.
|
static |
Adapt to G-sensor orientation This mode is the default value on mobile platforms. In this mode, the video image published by the current user is adjusted according to the G-sensor orientation, while the orientation of the local preview image remains unchanged. One of the adaptation modes currently supported by the SDK is as follows: when the phone or tablet is upside down, in order to ensure that the screen orientation seen by the remote user is normal, the SDK will automatically rotate the published video image by 180 degrees. If the UI layer of your application has enabled G-sensor adaption, we recommend you use the UIFixLayout
mode.
|
static |
Adapt to G-sensor orientation In this mode, the video image published by the current user is adjusted according to the G-sensor orientation, and the local preview image will also be rotated accordingly. One of the features currently supported is as follows: when the phone or tablet is upside down, in order to ensure that the screen orientation seen by the remote user is normal, the SDK will automatically rotate the published video image by 180 degrees. If the UI layer of your application doesn't support G-sensor adaption, but you want the video image in the SDK to adapt to the G-sensor orientation, we recommend you use the UIFixLayout
mode.
|
static |
Output logs at the DEBUG, INFO, WARNING, ERROR, and FATAL levels.
|
static |
Output logs at the ERROR and FATAL levels.
|
static |
Output logs at the FATAL level.
|
static |
Output logs at the INFO, WARNING, ERROR, and FATAL levels.
|
static |
Do not output any SDK logs.
|
static |
Output logs at all levels.
|
static |
Output logs at the WARNING, ERROR, and FATAL levels.
|
static |
Mix both audio and video.
|
static |
Mix audio only.
|
static |
Mix video only.
|
static |
Default. Considering the compatibility with older versions, if you specify the inputType as Undefined, the SDK will determine the stream mix input type according to the value of the pureAudio
parameter
|
static |
Mix watermark In this case, you don't need to specify the userId
parameter, but you need to specify the image
parameter. It is recommended to use png format.
|
static |
The current network is bad.
|
static |
The current network cannot meet the minimum requirements of TRTC.
|
static |
The current network is excellent.
|
static |
The current network is good.
|
static |
The current network is fair.
|
static |
Undefined.
|
static |
The current network is very bad.
|
static |
Record audio only.
|
static |
Record both audio and video.
|
static |
Record video only.
|
static |
Disable reverb.
|
static |
KTV.
|
static |
Small room.
|
static |
Hall.
|
static |
Deep.
|
static |
Resonant.
|
static |
Metallic.
|
static |
Husky.
|
static |
|
static |
Manual layout mode In this mode, you need to specify the precise position of each video image. This mode has the highest degree of freedom, but its ease of use is the worst:
TRTCTranscodingConfig
, including the position coordinates of each video image (TRTCMixUser).onUserVideoAvailable()
and onUserAudioAvailable()
event callbacks in TRTCCloudDelegate
and constantly adjust the mixUsers
parameter according to the audio/video status of each user with mic on in the current room.
|
static |
Preset layout mode This is the most popular layout mode, because it allows you to set the position of each video image in advance through placeholders, and then the SDK automatically adjusts it dynamically according to the number of video images in the room. In this mode, you still need to set the mixUsers
parameter, but you can set userId
as a "placeholder". Placeholder values include:
onUserVideoAvailable()
and onUserAudioAvailable()
callbacks in TRTCCloudDelegate
to make real-time adjustments. Instead, you only need to call setMixTranscodingConfig()
once after successful room entry. Then, the SDK will automatically populate the placeholders you set with real userId
values.
|
static |
Pure audio mode This mode is suitable for pure audio scenarios such as audio call (AudioCall) and audio chat room (VoiceChatRoom).
setMixTranscodingConfig()
API after room entry, and then the SDK will automatically mix the audio of all mic-on users in the room into the current user's live stream.mixUsers
parameter in TRTCTranscodingConfig
; instead, you only need to set the audioSampleRate
, audioBitrate
and audioChannels
parameters.
|
static |
Screen sharing mode This mode is suitable for screen sharing-based use cases such as online education and supported only by the SDKs for Windows and macOS. In this mode, the SDK will first build a canvas according to the target resolution you set (through the videoWidth
and videoHeight
parameters).
setLocalVideoRenderCallback
API. In this mode, you don't need to set the mixUsers
parameter in TRTCTranscodingConfig
, and the SDK will not mix students' images so as not to interfere with the screen sharing effect. br> You can set width x height in TRTCTranscodingConfig
to 0 px x 0 px, and the SDK will automatically calculate a suitable resolution based on the aspect ratio of the user's current screen.
|
static |
Undefined.
|
static |
Use memory buffer to transfer video data. iOS: more compact memory block in NSData
type after additional processing; Android: byte[]
for Java layer. This transfer method has a lower efficiency than other methods.
|
static |
Use memory buffer to transfer video data. iOS: PixelBuffer
; Android: Direct Buffer
for JNI layer; Windows: memory data block.
|
static |
Use texture to transfer video data.
|
static |
Undefined transfer method.
|
static |
Auto mode: mirror the front camera's image but not the rear camera's image (for mobile devices only).
|
static |
Disable mirroring for both the front and rear cameras.
|
static |
Mirror the images of both the front and rear cameras.
|
static |
YUV420P (I420) format.
|
static |
NV21 format.
|
static |
RGBA format.
|
static |
OpenGL 2D texture format.
|
static |
OES external texture format (for Android)
|
static |
Undefined format.
|
static |
Ensuring clarity (default value): in this mode, when the current network is unable to transfer a clear and smooth video image, the clarity of the image will be given priority, but there will be lags.
|
static |
Ensuring smoothness: in this mode, when the current network is unable to transfer a clear and smooth video image, the smoothness of the image will be given priority, but there will be blurs.
|
static |
Fill mode: the video image will be centered and scaled to fill the entire display area, where parts that exceed the area will be cropped. The displayed image may be incomplete in this mode.
Video image fill mode
If the aspect ratio of the video display area is not equal to that of the video image, you need to specify the fill mode:
|
static |
Fit mode: the video image will be scaled based on its long side to fit the display area, where the short side will be filled with black bars. The displayed image is complete in this mode, but there may be black bars.
|
static |
Aspect ratio: 1:1; resolution: 120x120; recommended bitrate (VideoCall): 80 Kbps; recommended bitrate (LIVE): 120 Kbps.
|
static |
Aspect ratio: 16:9; resolution: 1280x720; recommended bitrate (VideoCall): 1200 Kbps; recommended bitrate (LIVE): 1800 Kbps.
|
static |
Aspect ratio: 4:3; resolution: 160x120; recommended bitrate (VideoCall): 100 Kbps; recommended bitrate (LIVE): 150 Kbps.
|
static |
Aspect ratio: 1:1; resolution: 160x160; recommended bitrate (VideoCall): 100 Kbps; recommended bitrate (LIVE): 150 Kbps.
|
static |
Aspect ratio: 16:9; resolution: 160x90; recommended bitrate (VideoCall): 150 Kbps; recommended bitrate (LIVE): 250 Kbps.
|
static |
Aspect ratio: 16:9; resolution: 1920x1080; recommended bitrate (VideoCall): 2000 Kbps; recommended bitrate (LIVE): 3000 Kbps.
|
static |
Aspect ratio: 4:3; resolution: 240x180; recommended bitrate (VideoCall): 150 Kbps; recommended bitrate (LIVE): 250 Kbps.
|
static |
Aspect ratio: 16:9; resolution: 256x144; recommended bitrate (VideoCall): 200 Kbps; recommended bitrate (LIVE): 300 Kbps.
|
static |
Aspect ratio: 1:1; resolution: 270x270; recommended bitrate (VideoCall): 200 Kbps; recommended bitrate (LIVE): 300 Kbps.
|
static |
Aspect ratio: 4:3; resolution: 280x210; recommended bitrate (VideoCall): 200 Kbps; recommended bitrate (LIVE): 300 Kbps.
|
static |
Aspect ratio: 16:9; resolution: 320x180; recommended bitrate (VideoCall): 250 Kbps; recommended bitrate (LIVE): 400 Kbps.
|
static |
Aspect ratio: 4:3; resolution: 320x240; recommended bitrate (VideoCall): 250 Kbps; recommended bitrate (LIVE): 375 Kbps.
|
static |
Aspect ratio: 4:3; resolution: 400x300; recommended bitrate (VideoCall): 300 Kbps; recommended bitrate (LIVE): 450 Kbps.
|
static |
Aspect ratio: 16:9; resolution: 480x270; recommended bitrate (VideoCall): 350 Kbps; recommended bitrate (LIVE): 550 Kbps.
|
static |
Aspect ratio: 4:3; resolution: 480x360; recommended bitrate (VideoCall): 400 Kbps; recommended bitrate (LIVE): 600 Kbps.
|
static |
Aspect ratio: 1:1; resolution: 480x480; recommended bitrate (VideoCall): 350 Kbps; recommended bitrate (LIVE): 500 Kbps.
|
static |
Aspect ratio: 16:9; resolution: 640x360; recommended bitrate (VideoCall): 500 Kbps; recommended bitrate (LIVE): 900 Kbps.
|
static |
Aspect ratio: 4:3; resolution: 640x480; recommended bitrate (VideoCall): 600 Kbps; recommended bitrate (LIVE): 900 Kbps.
|
static |
Aspect ratio: 16:9; resolution: 960x540; recommended bitrate (VideoCall): 850 Kbps; recommended bitrate (LIVE): 1300 Kbps.
|
static |
Aspect ratio: 4:3; resolution: 960x720; recommended bitrate (VideoCall): 1000 Kbps; recommended bitrate (LIVE): 1500 Kbps.
|
static |
Landscape resolution, such as TRTCVideoResolution_640_360 + TRTCVideoResolutionModeLandscape = 640x360.
|
static |
Portrait resolution, such as TRTCVideoResolution_640_360 + TRTCVideoResolutionModePortrait = 360x640.
|
static |
No rotation.
|
static |
Clockwise rotation by 180 degrees.
|
static |
Clockwise rotation by 270 degrees.
|
static |
Clockwise rotation by 90 degrees.
|
static |
HD big image: it is generally used to transfer video data from the camera.
|
static |
Smooth small image: it has the same content as the big image, but with lower resolution and bitrate and thus lower definition.
|
static |
Substream image: it is generally used for screen sharing. Only one user in the room is allowed to publish the substream video image at any time, while other users must wait for this user to close the substream before they can publish their own substream.
|
static |
Disable voice changing.
|
static |
Child.
|
static |
Robot.
|
static |
Ethereal.
|
static |
Girl.
|
static |
Middle-Aged man.
|
static |
Heavy metal.
|
static |
Nasal.
|
static |
Punk.
|
static |
Trapped beast.
|
static |
Otaku.
|
static |
Electronic.
|
static |
low-latency chorus capability
|
static |
low-latency earmonitor capability
|
static |
16 kHz sample rate
|
static |
32 kHz sample rate
|
static |
44.1 kHz sample rate
|
static |
48 kHz sample rate
|
static |
The stream enters the "Loading" state due to network congestion.
|
static |
The stream enters the "Playing" state after network recovery.
|
static |
Default value.
|
static |
As a start-related API was directly called locally, the stream enters the "Playing" state.
|
static |
As a stop-related API was directly called locally, the stream enters the "Stopped" state.
|
static |
As the remote user started (or resumed) publishing the video stream, the stream enters the "Loading" or "Playing" state.
|
static |
As the remote user stopped (or paused) publishing the video stream, the stream enters the "Stopped" state.
|
static |
Loading.
|
static |
Playing.
|
static |
Stopped.
|
static |
An anchor can publish their audio/video streams. There is a limit on the number of anchors. Up to 50 anchors are allowed to publish streams at the same time in one room.
|
static |
Audience can only listen to or watch audio/video streams of anchors in the room. If they want to publish their streams, they need to switch to the "anchor" role first through switchRole. One room can sustain up to 100,000 concurrent online users in the audience role.
|
static |
Auto: In the auto mode, call volume is used for anchors, and media volume for audience. This mode is suitable for live streaming scenarios. If the scenario you select during enterRoom
is TRTCAppSceneLIVE
or TRTCAppSceneVoiceChatRoom
, the SDK will automatically use this mode.
|
static |
Media volume: In this mode, media volume is used in all scenarios. It is rarely used, mainly suitable for music scenarios with demanding requirements on audio quality. Use this mode if most of your users use peripheral devices such as audio cards. Otherwise, it is not recommended.
|
static |
Call volume: In this mode, the audio module does not change its work mode when users switch between anchors and audience, enabling seamless mic on/off. This mode is suitable for scenarios where users need to switch frequently between anchors and audience. If the scenario you select during enterRoom
is TRTCAppSceneVideoCall
or TRTCAppSceneAudioCall
, the SDK will automatically use this mode.
|
static |
Client-based control, which is for internal debugging of SDK and shall not be used by users.
|
static |
On-cloud control, which is the default and recommended mode.