LiteAVSDK
Tencent Cloud TRTC SDK, is a high availability components serving tens of thousands of enterprise customers, which is committed to helping you to minimize your research and development costs.
TRTCCloudDef

Data Structures

class  TRTCParams
 
class  TRTCVideoEncParam
 
class  TRTCNetworkQosParam
 
class  TRTCRenderParams
 
class  TRTCQualityInfo
 
class  TRTCVolumeInfo
 
class  TRTCSpeedTestParams
 
class  TRTCSpeedTestResult
 
class  TRTCVideoFrame
 
class  TRTCAudioFrame
 
class  TRTCMixUser
 
class  TRTCTranscodingConfig
 
class  TRTCPublishCDNParam
 
class  TRTCAudioRecordingParams
 
class  TRTCLocalRecordingParams
 
class  TRTCAudioEffectParam
 
class  TRTCSwitchRoomConfig
 
class  TRTCAudioFrameDelegateFormat
 
class  TRTCScreenCaptureSourceInfo
 
class  TRTCAudioParallelParams
 

Typedefs

typedef UIView TXView
 
typedef UIImage TXImage
 
typedef UIEdgeInsets TXEdgeInsets
 
typedef TXMediaDeviceInfo TRTCMediaDeviceInfo
 

Enumerations

enum  TRTCVideoResolution : NSInteger
 
enum  TRTCVideoResolutionMode : NSInteger
 
enum  TRTCVideoStreamType : NSInteger
 
enum  TRTCVideoFillMode : NSInteger
 
enum  TRTCVideoRotation : NSInteger
 
enum  TRTCBeautyStyle : NSInteger
 
enum  TRTCVideoPixelFormat : NSInteger
 
enum  TRTCVideoBufferType : NSInteger
 
enum  TRTCVideoMirrorType : NSUInteger
 
enum  TRTCLocalVideoMirrorType : NSUInteger
 
enum  TRTCSnapshotSourceType : NSUInteger
 
enum  TRTCAppScene : NSInteger
 
enum  TRTCRoleType : NSInteger
 
enum  TRTCQosControlMode : NSInteger
 
enum  TRTCVideoQosPreference : NSInteger
 
enum  TRTCQuality : NSInteger
 
enum  TRTCAVStatusType : NSUInteger
 
enum  TRTCAVStatusChangeReason : NSUInteger
 
enum  TRTCAudioSampleRate : NSInteger
 
enum  TRTCAudioQuality : NSInteger
 
enum  TRTCAudioRoute : NSInteger
 
enum  TRTCReverbType : NSInteger
 
enum  TRTCVoiceChangerType : NSInteger
 
enum  TRTCSystemVolumeType : NSInteger
 
enum  TRTCLogLevel : NSInteger
 
enum  TRTCGSensorMode : NSInteger
 
enum  TRTCScreenCaptureSourceType : NSInteger
 
enum  TRTCTranscodingConfigMode : NSInteger
 
enum  TRTCRecordType : NSUInteger
 
enum  TRTCMixInputType : NSUInteger
 
enum  TRTCMediaDeviceType : NSInteger
 
enum  TRTCAudioRecordingContent : NSUInteger
 

Detailed Description

Tencent Cloud TRTC Key Type Definition.

Module: TRTC key class definition Description: definitions of enumerated and constant values such as resolution and quality level


Data Structure Documentation

◆ TRTCParams

class 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.

+ Inheritance diagram for TRTCParams:

Properties

UInt32 sdkAppId
 
NSString * userId
 
NSString * userSig
 
UInt32 roomId
 
NSString * strRoomId
 
TRTCRoleType role
 
NSString * streamId
 
NSString * userDefineRecordId
 
NSString * privateMapKey
 
NSString * bussInfo
 

Property Documentation

◆ bussInfo

- (NSString*) bussInfo
readwritenonatomiccopy

◆ privateMapKey

- (NSString*) privateMapKey
readwritenonatomiccopy

◆ role

- (TRTCRoleType) role
readwritenonatomicassign

◆ roomId

- (UInt32) roomId
readwritenonatomicassign

◆ sdkAppId

- (UInt32) sdkAppId
readwritenonatomicassign

◆ streamId

- (NSString*) streamId
readwritenonatomiccopy

◆ strRoomId

- (NSString*) strRoomId
readwritenonatomiccopy

◆ userDefineRecordId

- (NSString*) userDefineRecordId
readwritenonatomiccopy

◆ userId

- (NSString*) userId
readwritenonatomiccopy

◆ userSig

- (NSString*) userSig
readwritenonatomiccopy

◆ TRTCVideoEncParam

class 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.

+ Inheritance diagram for TRTCVideoEncParam:

Properties

TRTCVideoResolution videoResolution
 
TRTCVideoResolutionMode resMode
 
int videoFps
 
int videoBitrate
 
int minVideoBitrate
 
BOOL enableAdjustRes
 

Property Documentation

◆ enableAdjustRes

- (BOOL) enableAdjustRes
readwritenonatomicassign

◆ minVideoBitrate

- (int) minVideoBitrate
readwritenonatomicassign

◆ resMode

- (TRTCVideoResolutionMode) resMode
readwritenonatomicassign

◆ videoBitrate

- (int) videoBitrate
readwritenonatomicassign

◆ videoFps

- (int) videoFps
readwritenonatomicassign

Recommended value: 15 or 20 fps. If the frame rate is lower than 5 fps, there will be obvious lagging; if lower than 10 fps but higher than 5 fps, there will be slight lagging; if higher than 20 fps, the bandwidth will be wasted (the frame rate of movies is generally 24 fps). Note: the front cameras on certain Android phones do not support a capturing frame rate higher than 15 fps. For some Android phones that focus on beautification features, the capturing frame rate of the front cameras may be lower than 10 fps.

◆ videoResolution

- (TRTCVideoResolution) videoResolution
readwritenonatomicassign

◆ TRTCNetworkQosParam

class TRTCNetworkQosParam

Network QoS control parameter set

Network QoS control parameter. The settings determine the QoS control policy of the SDK in weak network conditions (e.g., whether to "ensure clarity" or "ensure smoothness").

+ Inheritance diagram for TRTCNetworkQosParam:

Properties

TRTCVideoQosPreference preference
 
TRTCQosControlMode controlMode
 

Property Documentation

◆ controlMode

- (TRTCQosControlMode) controlMode
readwritenonatomicassign

◆ preference

- (TRTCVideoQosPreference) preference
readwritenonatomicassign

◆ TRTCRenderParams

class TRTCRenderParams

Rendering parameters of video image

You can use these parameters to control the video image rotation angle, fill mode, and mirror mode.

+ Inheritance diagram for TRTCRenderParams:

Properties

TRTCVideoRotation rotation
 
TRTCVideoFillMode fillMode
 
TRTCVideoMirrorType mirrorType
 

Property Documentation

◆ fillMode

- (TRTCVideoFillMode) fillMode
readwritenonatomicassign

◆ mirrorType

- (TRTCVideoMirrorType) mirrorType
readwritenonatomicassign

◆ rotation

- (TRTCVideoRotation) rotation
readwritenonatomicassign

◆ TRTCQualityInfo

class TRTCQualityInfo

Network quality

This indicates the quality of the network. You can use it to display the network quality of each user on the UI.

+ Inheritance diagram for TRTCQualityInfo:

Properties

NSString * userId
 
TRTCQuality quality
 

Property Documentation

◆ quality

- (TRTCQuality) quality
readwritenonatomicassign

Network quality.

◆ userId

- (NSString*) userId
readwritenonatomiccopy

User ID.

◆ TRTCVolumeInfo

class TRTCVolumeInfo

Volume

This indicates the audio volume value. You can use it to display the volume of each user in the UI.

+ Inheritance diagram for TRTCVolumeInfo:

Properties

NSString * userId
 
NSUInteger volume
 

Property Documentation

◆ userId

- (NSString*) userId
readwritenonatomiccopy

userId of the speaker. An empty value indicates the local user.

◆ volume

- (NSUInteger) volume
readwritenonatomicassign

Volume of the speaker. Value range: 0–100.

◆ TRTCSpeedTestParams

class 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).

+ Inheritance diagram for TRTCSpeedTestParams:

Properties

uint32_t sdkAppId
 
NSString * userId
 
NSString * userSig
 
NSInteger expectedUpBandwidth
 
NSInteger expectedDownBandwidth
 

Property Documentation

◆ expectedDownBandwidth

- (NSInteger) expectedDownBandwidth
readwritenonatomicassign

Expected downstream bandwidth (kbps, value range: 10 to 5000, no downlink bandwidth test when it is 0).

◆ expectedUpBandwidth

- (NSInteger) expectedUpBandwidth
readwritenonatomicassign

Expected upstream bandwidth (kbps, value range: 10 to 5000, no uplink bandwidth test when it is 0).

◆ sdkAppId

- (uint32_t) sdkAppId
readwritenonatomicassign

Application identification, please refer to the relevant instructions in TRTCParams.

◆ userId

- (NSString*) userId
readwritenonatomiccopy

User identification, please refer to the relevant instructions in TRTCParams.

◆ userSig

- (NSString*) userSig
readwritenonatomiccopy

User signature, please refer to the relevant instructions in TRTCParams.

◆ TRTCSpeedTestResult

class 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).

+ Inheritance diagram for TRTCSpeedTestResult:

Properties

BOOL success
 
NSString * errMsg
 
NSString * ip
 
TRTCQuality quality
 
float upLostRate
 
float downLostRate
 
uint32_t rtt
 
NSInteger availableUpBandwidth
 
NSInteger availableDownBandwidth
 

Property Documentation

◆ availableDownBandwidth

- (NSInteger) availableDownBandwidth
readwritenonatomicassign

Downstream bandwidth (in kbps, -1: invalid value).

◆ availableUpBandwidth

- (NSInteger) availableUpBandwidth
readwritenonatomicassign

Upstream bandwidth (in kbps, -1: invalid value).

◆ downLostRate

- (float) downLostRate
readwritenonatomicassign

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.

◆ errMsg

- (NSString*) errMsg
readwritenonatomiccopy

Error message for network speed test.

◆ ip

- (NSString*) ip
readwritenonatomiccopy

Server IP address.

◆ quality

- (TRTCQuality) quality
readwritenonatomicassign

Network quality, which is tested and calculated based on the internal evaluation algorithm. For more information, please see TRTCQuality.

◆ rtt

- (uint32_t) rtt
readwritenonatomicassign

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.

◆ success

- (BOOL) success
readwritenonatomicassign

Whether the network speed test is successful.

◆ upLostRate

- (float) upLostRate
readwritenonatomicassign

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.

◆ TRTCVideoFrame

class 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.

+ Inheritance diagram for TRTCVideoFrame:

Properties

uint32_t width
 
uint32_t height
 
uint64_t timestamp
 

Property Documentation

◆ height

- (uint32_t) height
readwritenonatomicassign

◆ timestamp

- (uint64_t) timestamp
readwritenonatomicassign

◆ width

- (uint32_t) width
readwritenonatomicassign

◆ TRTCAudioFrame

class TRTCAudioFrame

Audio frame data

+ Inheritance diagram for TRTCAudioFrame:

◆ TRTCMixUser

class 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.

+ Inheritance diagram for TRTCMixUser:

Properties

BOOL pureAudio
 
TRTCMixInputType inputType
 
int renderMode
 
NSString * image
 

Property Documentation

◆ image

- (NSString*) image
readwritenonatomiccopy

◆ inputType

- (TRTCMixInputType) inputType
readwritenonatomicassign

◆ pureAudio

- (BOOL) pureAudio
readwritenonatomicassign

◆ renderMode

- (int) renderMode
readwritenonatomicassign

◆ TRTCTranscodingConfig

class 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.

+ Inheritance diagram for TRTCTranscodingConfig:

Properties

TRTCTranscodingConfigMode mode
 
int appId
 
int bizId
 
int videoWidth
 
int videoHeight
 
int videoBitrate
 
int videoFramerate
 
int videoGOP
 
int backgroundColor
 
NSString * backgroundImage
 
int audioSampleRate
 
int audioBitrate
 
int audioChannels
 
int audioCodec
 
NSArray< TRTCMixUser * > * mixUsers
 
NSString * streamId
 

Property Documentation

◆ appId

- (int) appId
readwritenonatomicassign

◆ audioBitrate

- (int) audioBitrate
readwritenonatomicassign

◆ audioChannels

- (int) audioChannels
readwritenonatomicassign

◆ audioCodec

- (int) audioCodec
readwritenonatomicassign

◆ audioSampleRate

- (int) audioSampleRate
readwritenonatomicassign

◆ backgroundColor

- (int) backgroundColor
readwritenonatomicassign

◆ backgroundImage

- (NSString*) backgroundImage
readwritenonatomiccopy

◆ bizId

- (int) bizId
readwritenonatomicassign

◆ mixUsers

- (NSArray<TRTCMixUser *>*) mixUsers
readwritenonatomiccopy

◆ mode

- (TRTCTranscodingConfigMode) mode
readwritenonatomicassign

◆ streamId

- (NSString*) streamId
readwritenonatomiccopy

◆ videoBitrate

- (int) videoBitrate
readwritenonatomicassign

◆ videoFramerate

- (int) videoFramerate
readwritenonatomicassign

◆ videoGOP

- (int) videoGOP
readwritenonatomicassign

◆ videoHeight

- (int) videoHeight
readwritenonatomicassign

◆ videoWidth

- (int) videoWidth
readwritenonatomicassign

◆ TRTCPublishCDNParam

class 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.

+ Inheritance diagram for TRTCPublishCDNParam:

Properties

int appId
 
int bizId
 
NSString * url
 
NSString * streamId
 

Property Documentation

◆ appId

- (int) appId
readwritenonatomicassign

◆ bizId

- (int) bizId
readwritenonatomicassign

◆ streamId

- (NSString*) streamId
readwritenonatomicstrong

◆ url

- (NSString*) url
readwritenonatomicstrong

◆ TRTCAudioRecordingParams

class TRTCAudioRecordingParams

Local audio file recording parameters

This parameter is used to specify the recording parameters in the audio recording API startAudioRecording.

+ Inheritance diagram for TRTCAudioRecordingParams:

Properties

NSString * filePath
 
TRTCAudioRecordingContent recordingContent
 

Property Documentation

◆ filePath

- (NSString*) filePath
readwritenonatomicstrong

◆ recordingContent

- (TRTCAudioRecordingContent) recordingContent
readwritenonatomicassign

◆ TRTCLocalRecordingParams

class 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.

+ Inheritance diagram for TRTCLocalRecordingParams:

Properties

NSString * filePath
 

Property Documentation

◆ filePath

- (NSString*) filePath
readwritenonatomiccopy

◆ TRTCAudioEffectParam

class 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 YES, the file is a "sound effect" file.

+ Inheritance diagram for TRTCAudioEffectParam:

Instance Methods

(_Nonnull instancetype) - init
 
(_Nonnull instancetype) - initWith:path:
 

Class Methods

(_Nonnull instancetype) + new
 

Properties

int effectId
 
int loopCount
 
BOOL publish
 
int volume
 

Method Documentation

◆ init()

- (_Nonnull instancetype) init

◆ initWith:path:()

- (_Nonnull instancetype) initWith: (int)  effectId
path: (NSString *_Nonnull)  path 

◆ new()

+ (_Nonnull instancetype) new

Property Documentation

◆ effectId

- (int) effectId
readwritenonatomicassign

◆ loopCount

- (int) loopCount
readwritenonatomicassign

◆ publish

- (BOOL) publish
readwritenonatomicassign

◆ volume

- (int) volume
readwritenonatomicassign

◆ TRTCSwitchRoomConfig

class 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.

+ Inheritance diagram for TRTCSwitchRoomConfig:

Properties

UInt32 roomId
 
NSString * strRoomId
 
NSString * userSig
 
NSString * privateMapKey
 

Property Documentation

◆ privateMapKey

- (NSString*) privateMapKey
readwritenonatomiccopy

◆ roomId

- (UInt32) roomId
readwritenonatomicassign

◆ strRoomId

- (NSString*) strRoomId
readwritenonatomiccopy

◆ userSig

- (NSString*) userSig
readwritenonatomiccopy

◆ TRTCAudioFrameDelegateFormat

class TRTCAudioFrameDelegateFormat

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.

+ Inheritance diagram for TRTCAudioFrameDelegateFormat:

Properties

TRTCAudioSampleRate sampleRate
 
int channels
 
int samplesPerCall
 

Property Documentation

◆ channels

- (int) channels
readwritenonatomicassign

◆ sampleRate

- (TRTCAudioSampleRate) sampleRate
readwritenonatomicassign

◆ samplesPerCall

- (int) samplesPerCall
readwritenonatomicassign

◆ TRTCScreenCaptureSourceInfo

class TRTCScreenCaptureSourceInfo

Screen sharing target information (for desktop systems only)

When users share the screen, they can choose to share the entire desktop or only the window of a certain program. TRTCScreenCaptureSourceInfo is used to describe the information of the target to be shared, including ID, name, and thumbnail. The fields in this structure are read-only.

+ Inheritance diagram for TRTCScreenCaptureSourceInfo:

◆ TRTCAudioParallelParams

class TRTCAudioParallelParams

parameter of the parallel strategy of remote audio streams

This parameter is used to set the parallel strategy of remote audio streams.

+ Inheritance diagram for TRTCAudioParallelParams:

Properties

UInt32 maxCount
 
NSArray< NSString * > * includeUsers
 

Property Documentation

◆ includeUsers

- (NSArray<NSString *>*) includeUsers
readwritenonatomicstrong

◆ maxCount

- (UInt32) maxCount
readwritenonatomicassign

Typedef Documentation

◆ TRTCMediaDeviceInfo

◆ TXEdgeInsets

typedef NSEdgeInsets TXEdgeInsets

◆ TXImage

typedef NSImage TXImage

◆ TXView

typedef NSView TXView

[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 iOS, you can directly use UIView as the video rendering control, and the SDK will draw the video image on the UIView you provide.
  • On macOS, you can directly use NSView as the video rendering control, and the SDK will draw the video image on the NSView you provide. Below is the sample code:
    UIView *videoView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 360, 640)];
    [self.view addSubview:videoView];
    [trtcCloud startLocalPreview:YES view:_localView];
    

Enumeration Type Documentation

◆ TRTCAppScene

enum TRTCAppScene : NSInteger

Use cases

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:

  • Live streaming scenario (LIVE): including LIVE (audio + video) and VoiceChatRoom (pure audio). In the live streaming scenario, users are divided into two roles: "anchor" and "audience". A single room can sustain up to 100,000 concurrent online users. This is suitable for live streaming to a large audience.
  • Real-Time scenario (RTC): including VideoCall (audio + video) and AudioCall (pure audio). In the real-time scenario, there is no role difference between users, but a single room can sustain only up to 300 concurrent online users. This is suitable for small-scale real-time communication.
Enumerator
TRTCAppSceneVideoCall 

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.

TRTCAppSceneLIVE 

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.

Note
In this scenario, you must use the role field in TRTCParams to specify the role of the current user.
TRTCAppSceneAudioCall 

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.

TRTCAppSceneVoiceChatRoom 

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.

Note
In this scenario, you must use the role field in TRTCParams to specify the role of the current user.

◆ TRTCAudioQuality

enum TRTCAudioQuality : NSInteger

Sound quality

TRTC provides three well-tuned modes to meet the differentiated requirements for sound quality in various verticals:

  • Speech mode (Speech): it is suitable for application scenarios that focus on human communication. In this mode, the audio transfer is more resistant, and TRTC uses various voice processing technologies to ensure the optimal smoothness even in weak network environments.
  • Music mode (Music): it is suitable for scenarios with demanding requirements for music. In this mode, the amount of transferred audio data is very large, and TRTC uses various technologies to ensure that the high-fidelity details of music signals can be restored in each frequency band.
  • Default mode (Default): it is between Speech and Music. In this mode, the reproduction of music is better than that in Speech mode, and the amount of transferred data is much lower than that in Music mode; therefore, this mode has good adaptability to various scenarios.
Enumerator
TRTCAudioQualitySpeech 

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.

TRTCAudioQualityDefault 

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.

TRTCAudioQualityMusic 

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.

◆ TRTCAudioRecordingContent

enum TRTCAudioRecordingContent : NSUInteger

Audio recording content type

This enumerated type is used in the audio recording API startAudioRecording to specify the content of the recorded audio.

Enumerator
TRTCAudioRecordingContentAll 

Record both local and remote audio.

TRTCAudioRecordingContentLocal 

Record local audio only.

TRTCAudioRecordingContentRemote 

Record remote audio only.

◆ TRTCAudioRoute

enum TRTCAudioRoute : NSInteger

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.

  • If the audio route is set to the receiver, the volume is relatively low, and the sound can be heard clearly only when the phone is put near the ear. This mode has a high level of privacy and is suitable for answering calls.
  • If the audio route is set to the speaker, the volume is relatively high, so there is no need to put the phone near the ear. Therefore, this mode can implement the "hands-free" feature.
Enumerator
TRTCAudioModeSpeakerphone 

Speakerphone: the speaker at the bottom is used for playback (hands-free). With relatively high volume, it is used to play music out loud.

TRTCAudioModeEarpiece 

Earpiece: the receiver at the top is used for playback. With relatively low volume, it is suitable for call scenarios that require privacy.

◆ TRTCAudioSampleRate

enum TRTCAudioSampleRate : NSInteger

Audio sample rate

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, TRTCAudioSampleRate48000 is recommended.

Enumerator
TRTCAudioSampleRate16000 

16 kHz sample rate

TRTCAudioSampleRate32000 

32 kHz sample rate

TRTCAudioSampleRate44100 

44.1 kHz sample rate

TRTCAudioSampleRate48000 

48 kHz sample rate

◆ TRTCAVStatusChangeReason

enum TRTCAVStatusChangeReason : NSUInteger

Reasons for playback status changes

This enumerated type is used in the video status changed API onRemoteVideoStatusUpdated to specify the reason for the current video status change.

Enumerator
TRTCAVStatusChangeReasonInternal 

Default value.

TRTCAVStatusChangeReasonBufferingBegin 

The stream enters the "Loading" state due to network congestion.

TRTCAVStatusChangeReasonBufferingEnd 

The stream enters the "Playing" state after network recovery.

TRTCAVStatusChangeReasonLocalStarted 

As a start-related API was directly called locally, the stream enters the "Playing" state.

TRTCAVStatusChangeReasonLocalStopped 

As a stop-related API was directly called locally, the stream enters the "Stopped" state.

TRTCAVStatusChangeReasonRemoteStarted 

As the remote user started (or resumed) publishing the video stream, the stream enters the "Loading" or "Playing" state.

TRTCAVStatusChangeReasonRemoteStopped 

As the remote user stopped (or paused) publishing the video stream, the stream enters the "Stopped" state.

◆ TRTCAVStatusType

enum TRTCAVStatusType : NSUInteger

Audio/Video playback status

This enumerated type is used in the video status changed API onRemoteVideoStatusUpdated to specify the current video status.

Enumerator
TRTCAVStatusStopped 

Stopped.

TRTCAVStatusPlaying 

Playing.

TRTCAVStatusLoading 

Loading.

◆ TRTCBeautyStyle

enum TRTCBeautyStyle : NSInteger

Beauty (skin smoothing) filter algorithm

TRTC has multiple built-in skin smoothing algorithms. You can select the one most suitable for your product.

Enumerator
TRTCBeautyStyleSmooth 

Smooth style, which uses a more radical algorithm for more obvious effect and is suitable for show live streaming.

TRTCBeautyStyleNature 

Natural style, which retains more facial details for more natural effect and is suitable for most live streaming use cases.

TRTCBeautyStylePitu 

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.

◆ TRTCGSensorMode

enum TRTCGSensorMode : NSInteger

G-sensor switch (for mobile devices only)

Enumerator
TRTCGSensorMode_Disable 

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.

TRTCGSensorMode_UIAutoLayout 

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.

TRTCGSensorMode_UIFixLayout 

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.

◆ TRTCLocalVideoMirrorType

enum TRTCLocalVideoMirrorType : NSUInteger

Old version of TRTCVideoMirrorType, reserved for compatibility with older interface.

Enumerator
TRTCLocalVideoMirrorType_Auto 
TRTCLocalVideoMirrorType_Enable 
TRTCLocalVideoMirrorType_Disable 

◆ TRTCLogLevel

enum TRTCLogLevel : NSInteger

Log level

Different log levels indicate different levels of details and number of logs. We recommend you set the log level to TRTCLogLevelInfo generally.

Enumerator
TRTCLogLevelVerbose 

Output logs at all levels.

TRTCLogLevelDebug 

Output logs at the DEBUG, INFO, WARNING, ERROR, and FATAL levels.

TRTCLogLevelInfo 

Output logs at the INFO, WARNING, ERROR, and FATAL levels.

TRTCLogLevelWarn 

Output logs at the WARNING, ERROR, and FATAL levels.

TRTCLogLevelError 

Output logs at the ERROR and FATAL levels.

TRTCLogLevelFatal 

Output logs at the FATAL level.

TRTCLogLevelNone 

Do not output any SDK logs.

◆ TRTCMediaDeviceType

enum TRTCMediaDeviceType : NSInteger

Device type (for desktop platforms only)

This enumerated value is used to define three types of audio/video devices, namely, camera, mic, and speaker, so that the same device management API can control the three different types of devices. Starting from v8.0, TRTC redefines TXMediaDeviceType in TXDeviceManager to replace TRTCMediaDeviceType on legacy versions. Only the definition of TRTCMediaDeviceType is retained here for compatibility with customer code on legacy versions.

Enumerator
TRTCMediaDeviceTypeUnknown 

undefined device type

TRTCMediaDeviceTypeAudioInput 

microphone

TRTCMediaDeviceTypeAudioOutput 

speaker

TRTCMediaDeviceTypeVideoCamera 

camera

TRTCMediaDeviceTypeVideoWindow 

windows(for screen share)

TRTCMediaDeviceTypeVideoScreen 

screen (for screen share)

◆ TRTCMixInputType

enum TRTCMixInputType : NSUInteger

Stream mix input type

Enumerator
TRTCMixInputTypeUndefined 

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

TRTCMixInputTypeAudioVideo 

Mix both audio and video.

TRTCMixInputTypePureVideo 

Mix video only.

TRTCMixInputTypePureAudio 

Mix audio only.

TRTCMixInputTypeWatermark 

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.

◆ TRTCQosControlMode

enum TRTCQosControlMode : NSInteger

QoS control mode (disused)

Enumerator
TRTCQosControlModeClient 

Client-based control, which is for internal debugging of SDK and shall not be used by users.

TRTCQosControlModeServer 

On-cloud control, which is the default and recommended mode.

◆ TRTCQuality

enum TRTCQuality : NSInteger

Network quality

TRTC evaluates the current network quality once every two seconds. The evaluation results are divided into six levels: Excellent indicates the best, and Down indicates the worst.

Enumerator
TRTCQuality_Unknown 

Undefined.

TRTCQuality_Excellent 

The current network is excellent.

TRTCQuality_Good 

The current network is good.

TRTCQuality_Poor 

The current network is fair.

TRTCQuality_Bad 

The current network is bad.

TRTCQuality_Vbad 

The current network is very bad.

TRTCQuality_Down 

The current network cannot meet the minimum requirements of TRTC.

◆ TRTCRecordType

enum TRTCRecordType : NSUInteger

Media recording type

This enumerated type is used in the local media recording API startLocalRecording to specify whether to record audio/video files or pure audio files.

Enumerator
TRTCRecordTypeAudio 

Record audio only.

TRTCRecordTypeVideo 

Record video only.

TRTCRecordTypeBoth 

Record both audio and video.

◆ TRTCReverbType

enum TRTCReverbType : NSInteger

Audio reverb mode

This enumerated value is used to set the audio reverb mode in the live streaming scenario and is often used in show live streaming.

Enumerator
TRTCReverbType_0 

Disable reverb.

TRTCReverbType_1 

KTV.

TRTCReverbType_2 

Small room.

TRTCReverbType_3 

Hall.

TRTCReverbType_4 

Deep.

TRTCReverbType_5 

Resonant.

TRTCReverbType_6 

Metallic.

TRTCReverbType_7 

Husky.

◆ TRTCRoleType

enum TRTCRoleType : NSInteger

Role

Role is applicable only to live streaming scenarios (TRTCAppSceneLIVE and TRTCAppSceneVoiceChatRoom). Users are divided into two roles:

  • Anchor, who 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.
  • Audience, who 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.
Enumerator
TRTCRoleAnchor 

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.

TRTCRoleAudience 

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.

◆ TRTCScreenCaptureSourceType

enum TRTCScreenCaptureSourceType : NSInteger

Screen sharing target type (for desktops only)

Enumerator
TRTCScreenCaptureSourceTypeUnknown 

Undefined.

TRTCScreenCaptureSourceTypeWindow 

The screen sharing target is the window of an application.

TRTCScreenCaptureSourceTypeScreen 

The screen sharing target is the entire screen.

◆ TRTCSnapshotSourceType

enum TRTCSnapshotSourceType : NSUInteger

Data source of local video screenshot

The SDK can take screenshots from the following two data sources and save them as local files:

  • Video stream: the SDK screencaptures the native video content from the video stream. The screenshots are not controlled by the display of the rendering control.
  • Rendering layer: the SDK screencaptures the displayed video content from the rendering control, which can achieve the effect of WYSIWYG, but if the display area is too small, the screenshots will also be very small.
Enumerator
TRTCSnapshotSourceTypeStream 

The SDK screencaptures the native video content from the video stream. The screenshots are not controlled by the display of the rendering control.

TRTCSnapshotSourceTypeView 

The SDK screencaptures the displayed video content from the rendering control, which can achieve the effect of WYSIWYG, but if the display area is too small, the screenshots will also be very small.

◆ TRTCSystemVolumeType

enum TRTCSystemVolumeType : NSInteger

System volume type (only for mobile devices)

Smartphones usually have two types of system volume: call volume and media volume.

  • Call volume is designed for call scenarios. It comes with acoustic echo cancellation (AEC) and supports audio capturing by Bluetooth earphones, but its sound quality is average. If you cannot turn the volume down to 0 (i.e., mute the phone) using the volume buttons, then your phone is using call volume.
  • Media volume is designed for media scenarios such as music playback. AEC does not work when media volume is used, and Bluetooth earphones cannot be used for audio capturing. However, media volume delivers better music listening experience. If you are able to mute your phone using the volume buttons, then your phone is using media volume. The SDK offers three system volume control modes: auto, call volume, and media volume.
Enumerator
TRTCSystemVolumeTypeAuto 

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.

TRTCSystemVolumeTypeMedia 

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.

TRTCSystemVolumeTypeVOIP 

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.

◆ TRTCTranscodingConfigMode

enum TRTCTranscodingConfigMode : NSInteger

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:

Enumerator
TRTCTranscodingConfigMode_Unknown 

Undefined.

TRTCTranscodingConfigMode_Manual 

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:

  • You need to enter all the parameters in TRTCTranscodingConfig, including the position coordinates of each video image (TRTCMixUser).
  • You need to listen on the 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.
TRTCTranscodingConfigMode_Template_PureAudio 

Pure audio mode This mode is suitable for pure audio scenarios such as audio call (AudioCall) and audio chat room (VoiceChatRoom).

  • You only need to set it once through the 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.
  • You don't need to set the mixUsers parameter in TRTCTranscodingConfig; instead, you only need to set the audioSampleRate, audioBitrate and audioChannels parameters.
TRTCTranscodingConfigMode_Template_PresetLayout 

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:

  • "$PLACE_HOLDER_REMOTE$": image of remote user. Multiple images can be set.
  • "$PLACE_HOLDER_LOCAL_MAIN$": local camera image. Only one image can be set.
  • "$PLACE_HOLDER_LOCAL_SUB$": local screen sharing image. Only one image can be set. In this mode, you don't need to listen on the 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.
TRTCTranscodingConfigMode_Template_ScreenSharing 

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).

  • Before the teacher enables screen sharing, the SDK will scale up the teacher's camera image and draw it onto the canvas.
  • After the teacher enables screen sharing, the SDK will draw the video image shared on the screen onto the same canvas. The purpose of this layout mode is to ensure consistency in the output resolution of the mixtranscoding module and avoid problems with blurred screen during course replay and webpage playback (web players don't support adjustable resolution). Meanwhile, the audio of mic-on students will be mixed into the teacher's audio/video stream by default. br> Video content is primarily the shared screen in teaching mode, and it is a waste of bandwidth to transfer camera image and screen image at the same time. Therefore, the recommended practice is to directly draw the camera image onto the current screen through the 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.
  • If the teacher's current screen width is less than or equal to 1920 px, the SDK will use the actual resolution of the teacher's current screen.
  • If the teacher's current screen width is greater than 1920 px, the SDK will select one of the three resolutions of 1920x1080 (16:9), 1920x1200 (16:10), and 1920x1440 (4:3) according to the current screen aspect ratio.

◆ TRTCVideoBufferType

enum TRTCVideoBufferType : NSInteger

Video data transfer method

For custom capturing and rendering features, you need to use the following enumerated values to specify the method of transferring video data:

  • Method 1. This method uses memory buffer to transfer video data. It is efficient on iOS but inefficient on Android. It is the only method supported on Windows currently.
  • Method 2. This method uses texture to transfer video data. It is efficient on both iOS and Android but is not supported on Windows. To use this method, you should have a general familiarity with OpenGL programming.
Enumerator
TRTCVideoBufferType_Unknown 

Undefined transfer method.

TRTCVideoBufferType_PixelBuffer 

Use memory buffer to transfer video data. iOS: PixelBuffer; Android: Direct Buffer for JNI layer; Windows: memory data block.

TRTCVideoBufferType_NSData 

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.

TRTCVideoBufferType_Texture 

Use texture to transfer video data.

◆ TRTCVideoFillMode

enum TRTCVideoFillMode : NSInteger

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:

Enumerator
TRTCVideoFillMode_Fill 

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.

TRTCVideoFillMode_Fit 

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.

◆ TRTCVideoMirrorType

enum TRTCVideoMirrorType : NSUInteger

Video mirror type

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.

Enumerator
TRTCVideoMirrorTypeAuto 

Auto mode: mirror the front camera's image but not the rear camera's image (for mobile devices only).

TRTCVideoMirrorTypeEnable 

Mirror the images of both the front and rear cameras.

TRTCVideoMirrorTypeDisable 

Disable mirroring for both the front and rear cameras.

◆ TRTCVideoPixelFormat

enum TRTCVideoPixelFormat : NSInteger

Video pixel format

TRTC provides custom video capturing and rendering features.

  • For the custom capturing feature, you can use the following enumerated values to describe the pixel format of the video you capture.
  • For the custom rendering feature, you can specify the pixel format of the video you expect the SDK to call back.
Enumerator
TRTCVideoPixelFormat_Unknown 

Undefined format.

TRTCVideoPixelFormat_I420 

YUV420P (I420) format.

TRTCVideoPixelFormat_Texture_2D 

OpenGL 2D texture format.

TRTCVideoPixelFormat_32BGRA 

BGRA32 format.

TRTCVideoPixelFormat_NV12 

YUV420SP (NV12) format.

◆ TRTCVideoQosPreference

enum TRTCVideoQosPreference : NSInteger

Image quality preference

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.

Enumerator
TRTCVideoQosPreferenceSmooth 

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.

TRTCVideoQosPreferenceClear 

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.

◆ TRTCVideoResolution

enum TRTCVideoResolution : NSInteger

Video resolution

Here, only the landscape resolution (e.g., 640x360) is defined. If the portrait resolution (e.g., 360x640) needs to be used, Portrait must be selected for TRTCVideoResolutionMode.

Enumerator
TRTCVideoResolution_120_120 

Aspect ratio: 1:1; resolution: 120x120; recommended bitrate (VideoCall): 80 Kbps; recommended bitrate (LIVE): 120 Kbps.

TRTCVideoResolution_160_160 

Aspect ratio: 1:1; resolution: 160x160; recommended bitrate (VideoCall): 100 Kbps; recommended bitrate (LIVE): 150 Kbps.

TRTCVideoResolution_270_270 

Aspect ratio: 1:1; resolution: 270x270; recommended bitrate (VideoCall): 200 Kbps; recommended bitrate (LIVE): 300 Kbps.

TRTCVideoResolution_480_480 

Aspect ratio: 1:1; resolution: 480x480; recommended bitrate (VideoCall): 350 Kbps; recommended bitrate (LIVE): 500 Kbps.

TRTCVideoResolution_160_120 

Aspect ratio: 4:3; resolution: 160x120; recommended bitrate (VideoCall): 100 Kbps; recommended bitrate (LIVE): 150 Kbps.

TRTCVideoResolution_240_180 

Aspect ratio: 4:3; resolution: 240x180; recommended bitrate (VideoCall): 150 Kbps; recommended bitrate (LIVE): 250 Kbps.

TRTCVideoResolution_280_210 

Aspect ratio: 4:3; resolution: 280x210; recommended bitrate (VideoCall): 200 Kbps; recommended bitrate (LIVE): 300 Kbps.

TRTCVideoResolution_320_240 

Aspect ratio: 4:3; resolution: 320x240; recommended bitrate (VideoCall): 250 Kbps; recommended bitrate (LIVE): 375 Kbps.

TRTCVideoResolution_400_300 

Aspect ratio: 4:3; resolution: 400x300; recommended bitrate (VideoCall): 300 Kbps; recommended bitrate (LIVE): 450 Kbps.

TRTCVideoResolution_480_360 

Aspect ratio: 4:3; resolution: 480x360; recommended bitrate (VideoCall): 400 Kbps; recommended bitrate (LIVE): 600 Kbps.

TRTCVideoResolution_640_480 

Aspect ratio: 4:3; resolution: 640x480; recommended bitrate (VideoCall): 600 Kbps; recommended bitrate (LIVE): 900 Kbps.

TRTCVideoResolution_960_720 

Aspect ratio: 4:3; resolution: 960x720; recommended bitrate (VideoCall): 1000 Kbps; recommended bitrate (LIVE): 1500 Kbps.

TRTCVideoResolution_160_90 

Aspect ratio: 16:9; resolution: 160x90; recommended bitrate (VideoCall): 150 Kbps; recommended bitrate (LIVE): 250 Kbps.

TRTCVideoResolution_256_144 

Aspect ratio: 16:9; resolution: 256x144; recommended bitrate (VideoCall): 200 Kbps; recommended bitrate (LIVE): 300 Kbps.

TRTCVideoResolution_320_180 

Aspect ratio: 16:9; resolution: 320x180; recommended bitrate (VideoCall): 250 Kbps; recommended bitrate (LIVE): 400 Kbps.

TRTCVideoResolution_480_270 

Aspect ratio: 16:9; resolution: 480x270; recommended bitrate (VideoCall): 350 Kbps; recommended bitrate (LIVE): 550 Kbps.

TRTCVideoResolution_640_360 

Aspect ratio: 16:9; resolution: 640x360; recommended bitrate (VideoCall): 500 Kbps; recommended bitrate (LIVE): 900 Kbps.

TRTCVideoResolution_960_540 

Aspect ratio: 16:9; resolution: 960x540; recommended bitrate (VideoCall): 850 Kbps; recommended bitrate (LIVE): 1300 Kbps.

TRTCVideoResolution_1280_720 

Aspect ratio: 16:9; resolution: 1280x720; recommended bitrate (VideoCall): 1200 Kbps; recommended bitrate (LIVE): 1800 Kbps.

TRTCVideoResolution_1920_1080 

Aspect ratio: 16:9; resolution: 1920x1080; recommended bitrate (VideoCall): 2000 Kbps; recommended bitrate (LIVE): 3000 Kbps.

◆ TRTCVideoResolutionMode

enum TRTCVideoResolutionMode : NSInteger

Video aspect ratio mode

Only the landscape resolution (e.g., 640x360) is defined in TRTCVideoResolution. If the portrait resolution (e.g., 360x640) needs to be used, Portrait must be selected for TRTCVideoResolutionMode.

Enumerator
TRTCVideoResolutionModeLandscape 

Landscape resolution, such as TRTCVideoResolution_640_360 + TRTCVideoResolutionModeLandscape = 640x360.

TRTCVideoResolutionModePortrait 

Portrait resolution, such as TRTCVideoResolution_640_360 + TRTCVideoResolutionModePortrait = 360x640.

◆ TRTCVideoRotation

enum TRTCVideoRotation : NSInteger

Video image rotation direction

TRTC provides rotation angle setting APIs for local and remote images. The following rotation angles are all clockwise.

Enumerator
TRTCVideoRotation_0 

No rotation.

TRTCVideoRotation_90 

Clockwise rotation by 90 degrees.

TRTCVideoRotation_180 

Clockwise rotation by 180 degrees.

TRTCVideoRotation_270 

Clockwise rotation by 270 degrees.

◆ TRTCVideoStreamType

enum TRTCVideoStreamType : NSInteger

Video stream type

TRTC provides three different video streams, including:

  • HD big image: it is generally used to transfer video data from the camera.
  • Smooth small image: it has the same content as the big image, but with lower resolution and bitrate and thus lower definition.
  • 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.
    Attention
    The SDK does not support enabling the smooth small image alone, which must be enabled together with the big image. It will automatically set the resolution and bitrate of the small image.
Enumerator
TRTCVideoStreamTypeBig 

HD big image: it is generally used to transfer video data from the camera.

TRTCVideoStreamTypeSmall 

Smooth small image: it has the same content as the big image, but with lower resolution and bitrate and thus lower definition.

TRTCVideoStreamTypeSub 

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.

◆ TRTCVoiceChangerType

enum TRTCVoiceChangerType : NSInteger

Voice changing type

This enumerated value is used to set the voice changing mode in the live streaming scenario and is often used in show live streaming.

Enumerator
TRTCVoiceChangerType_0 

Disable voice changing.

TRTCVoiceChangerType_1 

Child.

TRTCVoiceChangerType_2 

Girl.

TRTCVoiceChangerType_3 

Middle-Aged man.

TRTCVoiceChangerType_4 

Heavy metal.

TRTCVoiceChangerType_5 

Nasal.

TRTCVoiceChangerType_6 

Punk.

TRTCVoiceChangerType_7 

Trapped beast.

TRTCVoiceChangerType_8 

Otaku.

TRTCVoiceChangerType_9 

Electronic.

TRTCVoiceChangerType_10 

Robot.

TRTCVoiceChangerType_11 

Ethereal.