TUIRoomDeviceManager

Copyright (c) 2024 Tencent. All rights reserved.
Module: TUIRoomDeviceManager @ TUIKitEngine.
Function: Device testing and management APIs.



TUIRoomDeviceManager

TUIRoomDeviceManager

FuncList
DESC
Query whether the front camera is being used (only availiable for mobile OS).
Switch to the front/rear camera (only availiable for mobile OS).
Query whether automatic face detection is supported (only availiable for mobile OS).
Enable auto focus (only availiable for mobile OS).
Enable/Disable flash, i.e., the torch mode (only availiable for mobile OS).
Set the audio route (only availiable for mobile OS).

EnumType

EnumType
DESC
Audio routing (the route via which audio is played).

isFrontCamera

isFrontCamera

Query whether the front camera is being used (only availiable for mobile OS).

switchCamera

switchCamera
void switchCamera
(boolean frontCamera)

Switch to the front/rear camera (only availiable for mobile OS).

isAutoFocusEnabled

isAutoFocusEnabled

Query whether automatic face detection is supported (only availiable for mobile OS).

enableCameraAutoFocus

enableCameraAutoFocus
void enableCameraAutoFocus
(boolean enabled)

Enable auto focus (only availiable for mobile OS).

After auto focus is enabled, the camera will automatically detect and always focus on faces.

enableCameraTorch

enableCameraTorch
void enableCameraTorch
(boolean enabled)

Enable/Disable flash, i.e., the torch mode (only availiable for mobile OS).

setAudioRoute

setAudioRoute
void setAudioRoute
(AudioRoute route)

Set the audio route (only availiable 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.

TUIAudioRoute

TUIAudioRoute

Audio routing (the route via which audio is played).

Enum
Value
DESC
SPEAKERPHONE
0
Speakerphone: The speaker at the bottom is used for playback. With relatively high volume, it is used to play music out loud.
EARPIECE
1
Earpiece: The speaker at the top is used for playback. With relatively low volume, it is suitable for call scenarios that require privacy.