Packages | |
package | com.tencent.liteav.device |
Data Structures | |
interface | TXDeviceManager.TXSystemVolumeType |
interface | TXDeviceManager.TXAudioRoute |
interface | TXDeviceManager.TXCameraCaptureMode |
class | TXDeviceManager.TXCameraCaptureParam |
interface | TXDeviceManager |
Tencent Cloud Device Management Module.
Module: audio/video device management module Description: manages audio/video devices such as camera, mic, and speaker.
interface com::tencent::liteav::device::TXDeviceManager::TXSystemVolumeType |
System volume type (for mobile devices only)
Smartphones usually have two types of system volume: call volume and media volume.
The SDK offers three system volume control modes: auto, call volume, and media volume.
Data Fields | ||
---|---|---|
TXSystemVolumeTypeAuto | Auto. | |
TXSystemVolumeTypeMedia | Media volume. | |
TXSystemVolumeTypeVOIP | Call volume. |
interface com::tencent::liteav::device::TXDeviceManager::TXAudioRoute |
Audio route (the route via which audio is played)
Audio route is the route (speaker or receiver) via which audio is played. It applies only to mobile devices such as mobile phones. A mobile phone has two speakers: one at the top (receiver) and the other the bottom.
interface com::tencent::liteav::device::TXDeviceManager::TXCameraCaptureMode |
Camera acquisition preferences
This interface is used to set camera acquisition parameters.
class com::tencent::liteav::device::TXDeviceManager::TXCameraCaptureParam |
Camera acquisition parameters
This setting determines the quality of the local preview image.
interface com::tencent::liteav::device::TXDeviceManager |
Device APIs for mobile OS | |
boolean | isFrontCamera () |
int | switchCamera (boolean frontCamera) |
float | getCameraZoomMaxRatio () |
int | setCameraZoomRatio (float zoomRatio) |
boolean | isAutoFocusEnabled () |
int | enableCameraAutoFocus (boolean enabled) |
int | setCameraFocusPosition (int x, int y) |
boolean | enableCameraTorch (boolean enable) |
int | setAudioRoute (TXAudioRoute route) |
Device APIs for desktop OS | |
void | setCameraCapturerParam (TXCameraCaptureParam params) |
Disused APIs (the corresponding new APIs are recommended) | |
int | setSystemVolumeType (TXSystemVolumeType type) |
int enableCameraAutoFocus | ( | boolean | enabled | ) |
Enabling auto focus (for mobile OS)
After auto focus is enabled, the camera will automatically detect and always focus on faces.
boolean enableCameraTorch | ( | boolean | enable | ) |
Enabling/Disabling flash, i.e., the torch mode (for mobile OS)
float getCameraZoomMaxRatio | ( | ) |
Getting the maximum zoom ratio of the camera (for mobile OS)
boolean isAutoFocusEnabled | ( | ) |
Querying whether automatic face detection is supported (for mobile OS)
boolean isFrontCamera | ( | ) |
Querying whether the front camera is being used
int setAudioRoute | ( | TXAudioRoute | route | ) |
Setting the audio route (for mobile OS)
A mobile phone has two audio playback devices: the receiver at the top and the speaker at the bottom. If the audio route is set to the receiver, the volume is relatively low, and audio can be heard 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, and there is no need to put the phone near the ear. This mode enables the "hands-free" feature.
void setCameraCapturerParam | ( | TXCameraCaptureParam | params | ) |
Set camera acquisition preferences
int setCameraFocusPosition | ( | int | x, |
int | y | ||
) |
Adjusting the focus (for mobile OS)
This API can be used to achieve the following:
position | The spot to focus on. Pass in the coordinates of the spot you want to focus on. |
int setCameraZoomRatio | ( | float | zoomRatio | ) |
Setting the camera zoom ratio (for mobile OS)
zoomRatio | Value range: 1-5. 1 indicates the widest angle of view (original), and 5 the narrowest angle of view (zoomed in). |
int setSystemVolumeType | ( | TXSystemVolumeType | type | ) |
Setting the system volume type (for mobile OS)
startLocalAudio(quality)
API in TRTCCloud instead, which param quality
is used to decide audio quality. int switchCamera | ( | boolean | frontCamera | ) |
Switching to the front/rear camera (for mobile OS)