FuncList | DESC |
The status of the local device changed (only availiable for desktop OS). | |
Test camera video rendered success callback. | |
Test microphone volume callback. | |
Test speakerphone volume callback. |
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). | |
Set event observer. | |
Start camera testing (only availiable for desktop OS). | |
End camera testing (only availiable for desktop OS). | |
Start microphone testing (only availiable for desktop OS). | |
End microphone testing (only availiable for desktop OS) | |
Start speaker testing (only availiable for desktop OS). | |
End speaker testing (only availiable for desktop OS). | |
Get the device list (only availiable for desktop OS). | |
Set the device to use (only availiable for desktop OS). | |
Get the device currently in use (only availiable for desktop OS). |
FuncList | DESC |
Device information. |
EnumType | DESC |
Device type. | |
Device operation. | |
Audio routing (the route via which audio is played). |
- (void)onDeviceChanged: | (NSString *)deviceId |
type: | |
state: |
Param | DESC |
deviceId | Device ID. |
state | 0: Device has been added; 1: Device has been removed; 2: Device has been enabled. |
type | Device type. |
- (void)onTestCameraVideoFrameRendered: | (NSInteger)width |
height: | (NSInteger)height |
Param | DESC |
height | Height of the video. |
width | Width of the video. |
- (void)onTestMicVolume: | (NSInteger)volume |
Param | DESC |
volume | The volume value captured by the microphone, with a range of 0 - 100. |
- (void)onTestSpeakerVolume: | (NSInteger)volume |
Param | DESC |
volume | The volume value set by the SDK, with a range of 0 - 100. |
- (void)switchCamera: | (BOOL)frontCamera |
- (void)enableCameraAutoFocus: | (BOOL)enabled |
- (void)enableCameraTorch: | (BOOL)enabled |
- (void)setAudioRoute: |
- (void)setObserver: |
Param | DESC |
observer | Listening instance. |
- (void)startCameraDeviceTest: | (TUIVideoView *__nullable)view |
- (void)startMicDeviceTest: | (NSInteger)interval |
playback: | (BOOL)playback |
Param | DESC |
interval | Interval of volume callbacks. |
playback | true: The user can hear his own sound during testing. false: The user can not hear his own sound during testing. |
- (void)startSpeakerDeviceTest: | (NSString *) filePath |
Param | DESC |
filePath | Path of the audio file. |
- (void)getDevicesList: | |
callback: | (TUIDeviceListBlock)callback |
Param | DESC |
type | Device type. More details, see $TUIMediaDeviceType$. |
- (void)setCurrentDevice: | |
deviceId: | (NSString *) deviceId |
Param | DESC |
deviceId | |
type | Device type. More details, see $TUIMediaDeviceType$. |
- (void)getCurrentDevice: | |
callback: | (TUIDeviceInfoBlock) callback |
Param | DESC |
type | Device type. More details, see $TUIMediaDeviceType$. |
Enum | Value | DESC |
TUIMediaDeviceTypeUnknown | -1 | Undefined device type. |
TUIMediaDeviceTypeAudioInput | 0 | Microphone. |
TUIMediaDeviceTypeAudioOutput | 1 | Speaker or earpiece. |
TUIMediaDeviceTypeVideoCamera | 2 | Camera. |
Enum | Value | DESC |
TUIMediaDeviceStateAdd | 0 | Device has been added. |
TUIMediaDeviceStateRemove | 1 | Device has been removed. |
TUIMediaDeviceStateActive | 2 | Device has been enabled. |
Enum | Value | DESC |
TUIAudioRouteSpeakerphone | 0 | Speakerphone: The speaker at the bottom is used for playback. With relatively high volume, it is used to play music out loud. |
TUIAudioRouteEarpiece | 1 | Earpiece: The speaker at the top is used for playback. With relatively low volume, it is suitable for call scenarios that require privacy. |
EnumType | DESC |
deviceId | Device ID. |
deviceName | Device name. |
deviceProperties | Device properties. |
Was this page helpful?