FuncList | DESC |
Querying whether the front camera is being used | |
Switching to the front/rear camera (for mobile OS) | |
Getting the maximum zoom ratio of the camera (for mobile OS) | |
Setting the camera zoom ratio (for mobile OS) | |
Querying whether automatic face detection is supported (for mobile OS) | |
Enabling auto focus (for mobile OS) | |
Adjusting the focus (for mobile OS) | |
Enabling/Disabling flash, i.e., the torch mode (for mobile OS) | |
Setting the audio route (for mobile OS) | |
Getting the device list (for desktop OS) | |
Setting the device to use (for desktop OS) | |
Getting the device currently in use (for desktop OS) | |
Setting the volume of the current device (for desktop OS) | |
Getting the volume of the current device (for desktop OS) | |
Muting the current device (for desktop OS) | |
Querying whether the current device is muted (for desktop OS) | |
Set the audio device used by SDK to follow the system default device (for desktop OS) | |
Starting camera testing (for desktop OS) | |
Ending camera testing (for desktop OS) | |
Starting mic testing (for desktop OS) | |
Starting mic testing (for desktop OS) | |
Ending mic testing (for desktop OS) | |
Starting speaker testing (for desktop OS) | |
Ending speaker testing (for desktop OS) | |
Starting camera testing (for desktop OS) | |
Setting the volume of the current process in the volume mixer (for Windows) | |
Getting the volume of the current process in the volume mixer (for Windows) | |
Muting the current process in the volume mixer (for Windows) | |
Querying whether the current process is muted in the volume mixer (for Windows) | |
Set camera acquisition preferences | |
set onDeviceChanged callback | |
Setting the system volume type (for mobile OS) |
FuncList | DESC |
Camera acquisition parameters | |
Audio/Video device information (for desktop OS) | |
Device information list (for desktop OS) |
EnumType | DESC |
System volume type | |
Audio route (the route via which audio is played) | |
Device type (for desktop OS) | |
Device operation | |
Camera acquisition preferences |
int switchCamera | (bool frontCamera) |
int setCameraZoomRatio | (float zoomRatio) |
Param | DESC |
zoomRatio | Value range: 1-5. 1 indicates the widest angle of view (original), and 5 the narrowest angle of view (zoomed in).The maximum value is recommended to be 5. If the value exceeds 5, the video will become blurred. |
int enableCameraAutoFocus | (bool enabled) |
int setCameraFocusPosition | (float x |
| float y) |
Param | DESC |
position | The spot to focus on. Pass in the coordinates of the spot you want to focus on. |
int enableCameraTorch | (bool enabled) |
int setAudioRoute |
ITXDeviceCollection* getDevicesList |
Param | DESC |
type | Device type. Set it to the type of device you want to get. For details, please see the definition of TXMediaDeviceType . |
ITXDeviceCollection
object, after using this API, please call the release
method to release the resources. delete
to release the Collection object returned as deleting the ITXDeviceCollection* pointer will cause crash. type
are TXMediaDeviceTypeMic
, TXMediaDeviceTypeSpeaker
, and TXMediaDeviceTypeCamera
.int setCurrentDevice | |
| const char* deviceId) |
Param | DESC |
deviceId | |
type | Device type. For details, please see the definition of TXMediaDeviceType . |
ITXDeviceInfo* getCurrentDevice |
int setCurrentDeviceVolume | |
| uint32_t volume) |
Param | DESC |
volume | Volume. Value range: 0-100; default: 100 |
uint32_t getCurrentDeviceVolume |
int setCurrentDeviceMute | |
| bool mute) |
bool getCurrentDeviceMute |
int enableFollowingDefaultAudioDevice | |
| bool enable) |
Param | DESC |
enable | Whether to follow the system default audio device. true: following. When the default audio device of the system is changed or new audio device is plugged in, the SDK immediately switches the audio device. false:not following. When the default audio device of the system is changed or new audio device is plugged in, the SDK doesn't switch the audio device. |
type | Device type. For details, please see the definition of TXMediaDeviceType . |
int startCameraDeviceTest | (void* view) |
int startMicDeviceTest | (uint32_t interval) |
Param | DESC |
interval | Interval of volume callbacks |
int startMicDeviceTest | (uint32_t interval |
| bool playback) |
Param | DESC |
interval | Interval of volume callbacks |
playback | Whether to play back the microphone sound. The user will hear his own sound when testing the microphone if playback is true. |
int startSpeakerDeviceTest | (const char* filePath) |
Param | DESC |
filePath | Path of the audio file |
int startCameraDeviceTest |
ITRTCVideoRenderCallback
to get the images captured by the camera for custom rendering.int setApplicationPlayVolume | (int volume) |
int setApplicationMuteState | (bool bMute) |
void setCameraCapturerParam |
void setDeviceObserver | (ITXDeviceObserver* observer) |
int setSystemVolumeType |
startLocalAudio(quality)
API in TRTCCloud
instead, which param quality
is used to decide audio quality.Enum | Value | DESC |
TXSystemVolumeTypeAuto | 0 | Auto |
TXSystemVolumeTypeMedia | 1 | Media volume |
TXSystemVolumeTypeVOIP | 2 | Call volume |
Enum | Value | DESC |
TXAudioRouteSpeakerphone | 0 | Speakerphone: the speaker at the bottom is used for playback (hands-free). With relatively high volume, it is used to play music out loud. |
TXAudioRouteEarpiece | 1 | Earpiece: the receiver at the top is used for playback. With relatively low volume, it is suitable for call scenarios that require privacy. |
Enum | Value | DESC |
TXMediaDeviceTypeUnknown | -1 | undefined device type |
TXMediaDeviceTypeMic | 0 | microphone |
TXMediaDeviceTypeSpeaker | 1 | speaker or earpiece |
TXMediaDeviceTypeCamera | 2 | camera |
Enum | Value | DESC |
TXMediaDeviceStateAdd | 0 | The device has been plugged in |
TXMediaDeviceStateRemove | 1 | The device has been removed |
TXMediaDeviceStateActive | 2 | The device has been enabled |
TXMediaDefaultDeviceChanged | 3 | system default device changed |
Enum | Value | DESC |
TXCameraResolutionStrategyAuto | 0 | Auto adjustment of camera capture parameters. SDK selects the appropriate camera output parameters according to the actual acquisition device performance and network situation, and maintains a balance between device performance and video preview quality. |
TXCameraResolutionStrategyPerformance | 1 | Give priority to equipment performance. SDK selects the closest camera output parameters according to the user's encoder resolution and frame rate, so as to ensure the performance of the device. |
TXCameraResolutionStrategyHighQuality | 2 | Give priority to the quality of video preview. SDK selects higher camera output parameters to improve the quality of preview video. In this case, it will consume more CPU and memory to do video preprocessing. |
TXCameraCaptureManual | 3 | Allows the user to set the width and height of the video captured by the local camera. |
EnumType | DESC |
height | Field description: height of acquired image |
mode | |
width | Field description: width of acquired image |
EnumType | DESC |
getDeviceName() | device name (UTF-8) |
getDevicePID() | device id (UTF-8) |
EnumType | DESC |
getCount() | Size of this list. return Size of this list. |
index) | device properties (json format) Note examples: {"SupportedResolution":[{"width":640,"height":480},{"width":320,"height":240}]} param index value in [0,getCount),return device properties formatted by json |
release() | release function, don't use delete!!! |
Was this page helpful?