FuncList | DESC |
The status of a local device changed (for desktop OS only). |
FuncList | DESC |
Querying whether the front camera is being used (for mobile OS). | |
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). | |
Setting the device to use (for desktop OS). | |
Getting the device currently in use (for desktop OS). | |
Setting the system volume type (for mobile OS). |
FuncList | DESC |
Camera acquisition parameters. | |
Audio/Video device information (for desktop OS). |
EnumType | DESC |
System volume type (for mobile OS). | |
Audio route (the route via which audio is played). | |
Device type (for desktop OS). | |
Device operation. | |
Camera acquisition preferences. |
void onDeviceChanged | (String deviceId |
| |
|
Param | DESC |
deviceId | Device ID |
state | Device status. 0 : connected; 1 : disconnected; 2 : started |
type | Device type |
int switchCamera | (bool frontCamera) |
int setCameraZoomRatio | (double 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 | (int x |
| int 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 |
int setCurrentDevice | |
| String deviceId) |
Param | DESC |
deviceId | Device ID. You can get the ID of a device using the getDevicesList API. |
type | Device type. For details, please see the definition of TXMediaDeviceType . |
TXDeviceInfo getCurrentDevice |
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 |
deviceName | device name (UTF-8) |
devicePID | device id (UTF-8) |
deviceProperties | device properties |
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback