tencent cloud

Tencent Real-Time Communication

소식 및 공지 사항
제품 업데이트
Tencent Cloud 오디오/비디오 단말 SDK 재생 업그레이드 및 권한 부여 인증 추가
TRTC 월간 구독 패키지 출시 관련 안내
제품 소개
제품 개요
기본 개념
제품 기능
제품 장점
응용 시나리오
성능 데이터
구매 가이드
Billing Overview
무료 시간 안내
Monthly subscription
Pay-as-you-go
TRTC Overdue and Suspension Policy
과금 FAQ
Refund Instructions
신규 사용자 가이드
Demo 체험
Call
개요(TUICallKit)
Activate the Service
Run Demo
빠른 통합(TUICallKit)
오프라인 푸시
Conversational Chat
온클라우드 녹화(TUICallKit)
AI Noise Reduction
UI 사용자 정의
Calls integration to Chat
Additional Features
No UI Integration
Server APIs
Client APIs
Solution
ErrorCode
릴리스 노트
FAQs
라이브 스트리밍
Billing of Video Live Component
Overview
Activating the Service (TUILiveKit)
Demo 실행
No UI Integration
UI Customization
Live Broadcast Monitoring
Video Live Streaming
Voice Chat Room
Advanced Features
Client APIs
Server APIs
Error Codes
Release Notes
FAQs
RTC Engine
Activate Service
SDK 다운로드
API 코드 예시
Usage Guidelines
API 클라이언트 API
고급 기능
RTC RESTFUL API
History
Introduction
API Category
Room Management APIs
Stream mixing and relay APIs
On-cloud recording APIs
Data Monitoring APIs
Pull stream Relay Related interface
Web Record APIs
AI Service APIs
Cloud Slicing APIs
Cloud Moderation APIs
Companion Transcription APIs
Making API Requests
Call Quality Monitoring APIs
Usage Statistics APIs
Data Types
Appendix
Error Codes
콘솔 가이드
애플리케이션 관리
사용량 통계
모니터링 대시보드
개발 보조
Solution
Real-Time Chorus
FAQs
과금 개요
기능 관련
UserSig 관련
방화벽 제한 처리
설치 패키지 용량 축소 관련 질문
Andriod 및 iOS 관련
Web 관련
Flutter 관련
Electron 관련
TRTCCalling Web 관련
멀티미디어 품질 관련
기타 질문
Protocols and Policies
컴플라이언스 인증
보안 백서
정보 보안에 관한 참고 사항
Service Level Agreement
Apple Privacy Policy: PrivacyInfo.xcprivacy
TRTC 정책
개인 정보 보호 정책
데이터 처리 및 보안 계약
용어집
문서Tencent Real-Time Communication

TUIRoomDeviceManager

포커스 모드
폰트 크기
마지막 업데이트 시간: 2025-07-17 18:04:00
Copyright (c) 2024 Tencent. All rights reserved.
Module: TUIRoomDeviceManager @ TUIKitEngine.
Function: Device testing and management APIs.



TUIRoomDeviceManager

TUIRoomDeviceManagerObserver

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.

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).
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).

StructType

FuncList
DESC
Device information.

EnumType

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

onDeviceChanged:type:state:

onDeviceChanged:type:state:
- (void)onDeviceChanged:
(NSString *)deviceId
type:
(TUIMediaDeviceType)type
state:
(TUIMediaDeviceState)state

The status of the local device changed (only availiable for desktop OS).

Param
DESC
deviceId
Device ID.
state
0: Device has been added; 1: Device has been removed; 2: Device has been enabled.
type
Device type.
Note
The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.When the status of local device changed, the SDK will trigger this event callback.

onTestCameraVideoFrameRendered:height:

onTestCameraVideoFrameRendered:height:
- (void)onTestCameraVideoFrameRendered:
(NSInteger)width
height:
(NSInteger)height

Test camera video rendered success callback.

Param
DESC
height
Height of the video.
width
Width of the video.
Note
The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.When the local test camera video rendered successfully, the SDK will trigger the callback.

onTestMicVolume:

onTestMicVolume:
- (void)onTestMicVolume:
(NSInteger)volume

Test microphone volume callback.

Param
DESC
volume
The volume value captured by the microphone, with a range of 0 - 100.
Note
The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.When testing the local microphone, the SDK will trigger the callback.

onTestSpeakerVolume:

onTestSpeakerVolume:
- (void)onTestSpeakerVolume:
(NSInteger)volume

Test speakerphone volume callback.

Param
DESC
volume
The volume value set by the SDK, with a range of 0 - 100.
Note
The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.When testing the local speakerphone, the SDK will trigger the callback.

isFrontCamera

isFrontCamera

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

Note
The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.

switchCamera:

switchCamera:
- (void)switchCamera:
(BOOL)frontCamera

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

Note
The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.

isAutoFocusEnabled

isAutoFocusEnabled

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

Note
The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.

enableCameraAutoFocus:

enableCameraAutoFocus:
- (void)enableCameraAutoFocus:
(BOOL)enabled

Enable auto focus (only availiable for mobile OS).

Note
The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.
After auto focus is enabled, the camera will automatically detect and always focus on faces.

enableCameraTorch:

enableCameraTorch:
- (void)enableCameraTorch:
(BOOL)enabled

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

Note
The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.

setAudioRoute:

setAudioRoute:
- (void)setAudioRoute:
(TUIAudioRoute)route

Set the audio route (only availiable for mobile OS).

Note
The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.
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.

setObserver:

setObserver:
- (void)setObserver:
(id<TUIRoomDeviceManagerObserver>)observer

Set event observer.

Param
DESC
observer
Listening instance.
Note
The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.
You can use TUIRoomDeviceManagerObserver to receive events.

startCameraDeviceTest:

startCameraDeviceTest:
- (void)startCameraDeviceTest:
(TUIVideoView *__nullable)view

Start camera testing (only availiable for desktop OS).

Note
The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.
You can use the $setCurrentDevice$ API to switch between cameras during testing.

stopCameraDeviceTest

stopCameraDeviceTest

End camera testing (only availiable for desktop OS).

Note
The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.

startMicDeviceTest:playback:

startMicDeviceTest:playback:
- (void)startMicDeviceTest:
(NSInteger)interval
playback:
(BOOL)playback

Start microphone testing (only availiable for desktop OS).

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.
Note
The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.
This API is used to test whether the mic functions properly. The mic volume detected (value range: 0-100) is returned via a callback.

stopMicDeviceTest

stopMicDeviceTest

End microphone testing (only availiable for desktop OS)

Note
The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.

startSpeakerDeviceTest:

startSpeakerDeviceTest:
- (void)startSpeakerDeviceTest:
(NSString *) filePath

Start speaker testing (only availiable for desktop OS).

Param
DESC
filePath
Path of the audio file.
Note
The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.
This API is used to test whether the audio playback device functions properly by playing a specified audio file. If users can hear audio during testing, the device functions properly.

stopSpeakerDeviceTest

stopSpeakerDeviceTest

End speaker testing (only availiable for desktop OS).

Note
The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.

getDevicesList:callback:

getDevicesList:callback:
- (void)getDevicesList:
(TUIMediaDeviceType)type
callback:
(TUIDeviceListBlock)callback

Get the device list (only availiable for desktop OS).

Param
DESC
type
Device type. More details, see $TUIMediaDeviceType$.
Note
The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.

setCurrentDevice:deviceId:

setCurrentDevice:deviceId:
- (void)setCurrentDevice:
(TUIMediaDeviceType) type
deviceId:
(NSString *) deviceId

Set the device to use (only availiable for desktop OS).

Param
DESC
deviceId
Device ID, which you can use getDevicesList to get.
type
Device type. More details, see $TUIMediaDeviceType$.
Note
The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.

getCurrentDevice:callback:

getCurrentDevice:callback:
- (void)getCurrentDevice:
(TUIMediaDeviceType) type
callback:
(TUIDeviceInfoBlock) callback

Get the device currently in use (only availiable for desktop OS).

Param
DESC
type
Device type. More details, see $TUIMediaDeviceType$.
Note
The function supports the TUIRoomTypeConference and TUIRoomTypeLive room types.

TUIMediaDeviceType

TUIMediaDeviceType

Device type.

Enum
Value
DESC
TUIMediaDeviceTypeUnknown
-1
Undefined device type.
TUIMediaDeviceTypeAudioInput
0
Microphone.
TUIMediaDeviceTypeAudioOutput
1
Speaker or earpiece.
TUIMediaDeviceTypeVideoCamera
2
Camera.

TUIMediaDeviceState

TUIMediaDeviceState

Device operation.

Enum
Value
DESC
TUIMediaDeviceStateAdd
0
Device has been added.
TUIMediaDeviceStateRemove
1
Device has been removed.
TUIMediaDeviceStateActive
2
Device has been enabled.

TUIAudioRoute

TUIAudioRoute

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

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.

TUIDeviceInfo

TUIDeviceInfo

Device information.

EnumType
DESC
deviceId
Device ID.
deviceName
Device name.
deviceProperties
Device properties.

도움말 및 지원

문제 해결에 도움이 되었나요?

피드백