@tencent-rtc/mcp 1.2.8 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/resource/doc/chatuikit/faq/common/server.md +44 -0
- package/resource/doc/chatuikit/faq/web_sdk/faq.md +57 -0
- package/resource/doc/livekit/vue/components/co-guest-panel.md +3 -3
- package/resource/doc/livekit/vue/components/live-view.md +4 -4
- package/resource/doc/livekit/vue/{components/live-list.md → live-list-integration.md} +7 -7
- package/resource/doc/livekit/vue/{components/live-player.md → live-player-desk-integration.md} +8 -8
- package/resource/doc/livekit/vue/live-player-h5-integration.md +269 -0
- package/resource/doc/livekit/vue/workflow.md +218 -0
- package/resource/doc/native_live/android/V2TXLiveCode_api_android.md +312 -0
- package/resource/doc/native_live/android/V2TXLiveDef_api_android.md +430 -0
- package/resource/doc/native_live/android/V2TXLivePlayerObserver_api_android.md +679 -0
- package/resource/doc/native_live/android/V2TXLivePlayer_api_android.md +671 -0
- package/resource/doc/native_live/android/V2TXLivePremier_api_android.md +271 -0
- package/resource/doc/native_live/android/V2TXLivePusherObserver_api_android.md +849 -0
- package/resource/doc/native_live/android/V2TXLivePusher_api_android.md +1046 -0
- package/resource/doc/native_live/flutter/V2TXLiveCode_api_flutter.md +460 -0
- package/resource/doc/native_live/flutter/V2TXLiveDef_api_flutter.md +558 -0
- package/resource/doc/native_live/flutter/V2TXLivePlayerObserver_api_flutter.md +865 -0
- package/resource/doc/native_live/flutter/V2TXLivePlayer_api_flutter.md +657 -0
- package/resource/doc/native_live/flutter/V2TXLivePremier_api_flutter.md +437 -0
- package/resource/doc/native_live/flutter/V2TXLivePusherObserver_api_flutter.md +335 -0
- package/resource/doc/native_live/flutter/V2TXLivePusher_api_flutter.md +748 -0
- package/resource/doc/native_live/iOS/V2TXLiveCode_api_iOS.md +327 -0
- package/resource/doc/native_live/iOS/V2TXLiveDef_api_iOS.md +507 -0
- package/resource/doc/native_live/iOS/V2TXLivePlayerObserver_api_iOS.md +507 -0
- package/resource/doc/native_live/iOS/V2TXLivePlayer_api_iOS.md +659 -0
- package/resource/doc/native_live/iOS/V2TXLivePremier_api_iOS.md +284 -0
- package/resource/doc/native_live/iOS/V2TXLivePusherObserver_api_iOS.md +814 -0
- package/resource/doc/native_live/iOS/V2TXLivePusher_api_iOS.md +1000 -0
- package/resource/doc/trtc/C++/ITRTCCloud.md +4119 -0
- package/resource/doc/trtc/C++/ITRTCStatistics.md +325 -0
- package/resource/doc/trtc/C++/ITXAudioEffectManager.md +1289 -0
- package/resource/doc/trtc/C++/ITXDeviceManager.md +1028 -0
- package/resource/doc/trtc/C++/TRTCCloudCallback.md +2650 -0
- package/resource/doc/trtc/C++/TRTCTypeDef.md +3600 -0
- package/resource/doc/trtc/C++/TXLiteAVCode.md +921 -0
- package/resource/doc/trtc/android/TRTCCloud.md +3782 -0
- package/resource/doc/trtc/android/TRTCCloudDef.md +3880 -0
- package/resource/doc/trtc/android/TRTCCloudListener.md +2431 -0
- package/resource/doc/trtc/android/TRTCStatistics.md +295 -0
- package/resource/doc/trtc/android/TXAudioEffectManager.md +1289 -0
- package/resource/doc/trtc/android/TXBeautyManager.md +979 -0
- package/resource/doc/trtc/android/TXDeviceManager.md +440 -0
- package/resource/doc/trtc/android/TXLiteAVCode.md +905 -0
- package/resource/doc/trtc/iOS/TRTCCloud.md +4238 -0
- package/resource/doc/trtc/iOS/TRTCCloudDef.md +3730 -0
- package/resource/doc/trtc/iOS/TRTCCloudDelegate.md +2531 -0
- package/resource/doc/trtc/iOS/TRTCStatistics.md +295 -0
- package/resource/doc/trtc/iOS/TXAudioEffectManager.md +1100 -0
- package/resource/doc/trtc/iOS/TXBeautyManager.md +985 -0
- package/resource/doc/trtc/iOS/TXDeviceManager.md +1024 -0
- package/resource/doc/trtc/iOS/TXLiteAVCode.md +928 -0
- package/tools/definitions/get_faq_def.js +4 -0
- package/tools/definitions/get_faq_def.js.map +1 -1
- package/tools/definitions/get_native_live_api_def.js +23 -0
- package/tools/definitions/get_native_live_api_def.js.map +1 -0
- package/tools/definitions/get_trtc_native_api_def.js +16 -0
- package/tools/definitions/get_trtc_native_api_def.js.map +1 -0
- package/tools/definitions/get_web_live_uikit_component_detail_def.js +13 -8
- package/tools/definitions/get_web_live_uikit_component_detail_def.js.map +1 -1
- package/tools/definitions/get_web_live_uikit_integration_def.js +32 -0
- package/tools/definitions/get_web_live_uikit_integration_def.js.map +1 -0
- package/tools/index.js +8 -0
- package/tools/index.js.map +1 -1
- package/tools/live/get-web-live-uikit-integration.js +52 -0
- package/tools/live/get-web-live-uikit-integration.js.map +1 -0
- package/tools/native_live/get-native-live-api.js +31 -0
- package/tools/native_live/get-native-live-api.js.map +1 -0
- package/tools/trtc/get-trtc-native-api.js +31 -0
- package/tools/trtc/get-trtc-native-api.js.map +1 -0
- package/utils/generate-structured-result.js +34 -0
- package/utils/generate-structured-result.js.map +1 -0
- package/utils/handle-component-name.js +0 -8
- package/utils/handle-component-name.js.map +1 -1
- package/utils/report-cls-client.js +1 -1
- package/utils/report-es-client.js +1 -1
- /package/resource/doc/livekit/vue/{components/broadcast.md → live-pusher-integration.md} +0 -0
|
@@ -0,0 +1,1024 @@
|
|
|
1
|
+
# TRTC SDK Documentation
|
|
2
|
+
## Feature Overview
|
|
3
|
+
`TXDeviceManager.h` provides audio and video device management for the TRTC (Real-Time Communication) SDK on iOS. Use this module to control hardware devices such as cameras, microphones, and speakers.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## TXDeviceObserver
|
|
7
|
+
<table>
|
|
8
|
+
<tr>
|
|
9
|
+
<td rowspan="1" colSpan="1" >Function List</td>
|
|
10
|
+
|
|
11
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
12
|
+
</tr>
|
|
13
|
+
|
|
14
|
+
<tr>
|
|
15
|
+
<td rowspan="1" colSpan="1" >[onDeviceChanged:type:state:](https://write.woa.com/document/87029847188574208)</td>
|
|
16
|
+
|
|
17
|
+
<td rowspan="1" colSpan="1" >Local device connection status has changed (applicable only to desktop systems)</td>
|
|
18
|
+
</tr>
|
|
19
|
+
</table>
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## TXDeviceManager
|
|
23
|
+
<table>
|
|
24
|
+
<tr>
|
|
25
|
+
<td rowspan="1" colSpan="1" >Function List</td>
|
|
26
|
+
|
|
27
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
28
|
+
</tr>
|
|
29
|
+
|
|
30
|
+
<tr>
|
|
31
|
+
<td rowspan="1" colSpan="1" >[isFrontCamera](https://write.woa.com/document/87029847188574208)</td>
|
|
32
|
+
|
|
33
|
+
<td rowspan="1" colSpan="1" >Determine whether the current camera is front-facing (only for mobile terminal)</td>
|
|
34
|
+
</tr>
|
|
35
|
+
|
|
36
|
+
<tr>
|
|
37
|
+
<td rowspan="1" colSpan="1" >[switchCamera:](https://write.woa.com/document/87029847188574208)</td>
|
|
38
|
+
|
|
39
|
+
<td rowspan="1" colSpan="1" >Switch between front and rear cameras (only for mobile terminal)</td>
|
|
40
|
+
</tr>
|
|
41
|
+
|
|
42
|
+
<tr>
|
|
43
|
+
<td rowspan="1" colSpan="1" >[isCameraZoomSupported](https://write.woa.com/document/87029847188574208)</td>
|
|
44
|
+
|
|
45
|
+
<td rowspan="1" colSpan="1" >Check if the current camera supports scaling (only for mobile terminal)</td>
|
|
46
|
+
</tr>
|
|
47
|
+
|
|
48
|
+
<tr>
|
|
49
|
+
<td rowspan="1" colSpan="1" >[getCameraZoomMaxRatio](https://write.woa.com/document/87029847188574208)</td>
|
|
50
|
+
|
|
51
|
+
<td rowspan="1" colSpan="1" >Get the maximum zoom level of the camera (only for mobile terminal)</td>
|
|
52
|
+
</tr>
|
|
53
|
+
|
|
54
|
+
<tr>
|
|
55
|
+
<td rowspan="1" colSpan="1" >[setCameraZoomRatio:](https://write.woa.com/document/87029847188574208)</td>
|
|
56
|
+
|
|
57
|
+
<td rowspan="1" colSpan="1" >Set the zoom level of the camera (only for mobile terminal)</td>
|
|
58
|
+
</tr>
|
|
59
|
+
|
|
60
|
+
<tr>
|
|
61
|
+
<td rowspan="1" colSpan="1" >[isAutoFocusEnabled](https://write.woa.com/document/87029847188574208)</td>
|
|
62
|
+
|
|
63
|
+
<td rowspan="1" colSpan="1" >Check if automatic face position recognition is supported (only for mobile terminal)</td>
|
|
64
|
+
</tr>
|
|
65
|
+
|
|
66
|
+
<tr>
|
|
67
|
+
<td rowspan="1" colSpan="1" >[enableCameraAutoFocus:](https://write.woa.com/document/87029847188574208)</td>
|
|
68
|
+
|
|
69
|
+
<td rowspan="1" colSpan="1" >Enable autofocus feature (only for mobile terminal)</td>
|
|
70
|
+
</tr>
|
|
71
|
+
|
|
72
|
+
<tr>
|
|
73
|
+
<td rowspan="1" colSpan="1" >[setCameraFocusPosition:](https://write.woa.com/document/87029847188574208)</td>
|
|
74
|
+
|
|
75
|
+
<td rowspan="1" colSpan="1" >Set the focus position of the camera (only for mobile terminal)</td>
|
|
76
|
+
</tr>
|
|
77
|
+
|
|
78
|
+
<tr>
|
|
79
|
+
<td rowspan="1" colSpan="1" >[isCameraTorchSupported](https://write.woa.com/document/87029847188574208)</td>
|
|
80
|
+
|
|
81
|
+
<td rowspan="1" colSpan="1" >Check if the flash can be turned on (only for mobile terminal)</td>
|
|
82
|
+
</tr>
|
|
83
|
+
|
|
84
|
+
<tr>
|
|
85
|
+
<td rowspan="1" colSpan="1" >[enableCameraTorch:](https://write.woa.com/document/87029847188574208)</td>
|
|
86
|
+
|
|
87
|
+
<td rowspan="1" colSpan="1" >Turn the flash on/off, also known as flashlight mode (only for mobile terminal)</td>
|
|
88
|
+
</tr>
|
|
89
|
+
|
|
90
|
+
<tr>
|
|
91
|
+
<td rowspan="1" colSpan="1" >[setAudioRoute:](https://write.woa.com/document/87029847188574208)</td>
|
|
92
|
+
|
|
93
|
+
<td rowspan="1" colSpan="1" >Set audio routing (only for mobile terminal)</td>
|
|
94
|
+
</tr>
|
|
95
|
+
|
|
96
|
+
<tr>
|
|
97
|
+
<td rowspan="1" colSpan="1" >[setExposureCompensation:](https://write.woa.com/document/87029847188574208)</td>
|
|
98
|
+
|
|
99
|
+
<td rowspan="1" colSpan="1" >Set the exposure parameters of the camera, ranging from -1 to 1</td>
|
|
100
|
+
</tr>
|
|
101
|
+
|
|
102
|
+
<tr>
|
|
103
|
+
<td rowspan="1" colSpan="1" >[getDevicesList:](https://write.woa.com/document/87029847188574208)</td>
|
|
104
|
+
|
|
105
|
+
<td rowspan="1" colSpan="1" >Get the device list (only for desktop terminal)</td>
|
|
106
|
+
</tr>
|
|
107
|
+
|
|
108
|
+
<tr>
|
|
109
|
+
<td rowspan="1" colSpan="1" >[setCurrentDevice:deviceId:](https://write.woa.com/document/87029847188574208)</td>
|
|
110
|
+
|
|
111
|
+
<td rowspan="1" colSpan="1" >Set the current device to use (only for desktop terminal)</td>
|
|
112
|
+
</tr>
|
|
113
|
+
|
|
114
|
+
<tr>
|
|
115
|
+
<td rowspan="1" colSpan="1" >[getCurrentDevice:](https://write.woa.com/document/87029847188574208)</td>
|
|
116
|
+
|
|
117
|
+
<td rowspan="1" colSpan="1" >Get the current device in use (only for desktop terminal)</td>
|
|
118
|
+
</tr>
|
|
119
|
+
|
|
120
|
+
<tr>
|
|
121
|
+
<td rowspan="1" colSpan="1" >[setCurrentDeviceVolume:deviceType:](https://write.woa.com/document/87029847188574208)</td>
|
|
122
|
+
|
|
123
|
+
<td rowspan="1" colSpan="1" >Set the current device volume (only for desktop terminal)</td>
|
|
124
|
+
</tr>
|
|
125
|
+
|
|
126
|
+
<tr>
|
|
127
|
+
<td rowspan="1" colSpan="1" >[getCurrentDeviceVolume:](https://write.woa.com/document/87029847188574208)</td>
|
|
128
|
+
|
|
129
|
+
<td rowspan="1" colSpan="1" >Get the current device volume (only for desktop terminal)</td>
|
|
130
|
+
</tr>
|
|
131
|
+
|
|
132
|
+
<tr>
|
|
133
|
+
<td rowspan="1" colSpan="1" >[setCurrentDeviceMute:deviceType:](https://write.woa.com/document/87029847188574208)</td>
|
|
134
|
+
|
|
135
|
+
<td rowspan="1" colSpan="1" >Set the mute status of the current device (only for desktop terminal)</td>
|
|
136
|
+
</tr>
|
|
137
|
+
|
|
138
|
+
<tr>
|
|
139
|
+
<td rowspan="1" colSpan="1" >[getCurrentDeviceMute:](https://write.woa.com/document/87029847188574208)</td>
|
|
140
|
+
|
|
141
|
+
<td rowspan="1" colSpan="1" >Get the mute status of the current device (only for desktop terminal)</td>
|
|
142
|
+
</tr>
|
|
143
|
+
|
|
144
|
+
<tr>
|
|
145
|
+
<td rowspan="1" colSpan="1" >[enableFollowingDefaultAudioDevice:enable:](https://write.woa.com/document/87029847188574208)</td>
|
|
146
|
+
|
|
147
|
+
<td rowspan="1" colSpan="1" >Set SDK to use the audio device according to the default system device (only for desktop terminal)</td>
|
|
148
|
+
</tr>
|
|
149
|
+
|
|
150
|
+
<tr>
|
|
151
|
+
<td rowspan="1" colSpan="1" >[startCameraDeviceTest:](https://write.woa.com/document/87029847188574208)</td>
|
|
152
|
+
|
|
153
|
+
<td rowspan="1" colSpan="1" >Start camera testing (only for desktop terminal)</td>
|
|
154
|
+
</tr>
|
|
155
|
+
|
|
156
|
+
<tr>
|
|
157
|
+
<td rowspan="1" colSpan="1" >[stopCameraDeviceTest](https://write.woa.com/document/87029847188574208)</td>
|
|
158
|
+
|
|
159
|
+
<td rowspan="1" colSpan="1" >End camera testing (only for desktop terminal)</td>
|
|
160
|
+
</tr>
|
|
161
|
+
|
|
162
|
+
<tr>
|
|
163
|
+
<td rowspan="1" colSpan="1" >[startMicDeviceTest:](https://write.woa.com/document/87029847188574208)</td>
|
|
164
|
+
|
|
165
|
+
<td rowspan="1" colSpan="1" >Start mic testing (only for desktop terminal)</td>
|
|
166
|
+
</tr>
|
|
167
|
+
|
|
168
|
+
<tr>
|
|
169
|
+
<td rowspan="1" colSpan="1" >[startMicDeviceTest:playback:](https://write.woa.com/document/87029847188574208)</td>
|
|
170
|
+
|
|
171
|
+
<td rowspan="1" colSpan="1" >Start mic testing (only for desktop terminal)</td>
|
|
172
|
+
</tr>
|
|
173
|
+
|
|
174
|
+
<tr>
|
|
175
|
+
<td rowspan="1" colSpan="1" >[stopMicDeviceTest](https://write.woa.com/document/87029847188574208)</td>
|
|
176
|
+
|
|
177
|
+
<td rowspan="1" colSpan="1" >End mic testing (only for desktop terminal)</td>
|
|
178
|
+
</tr>
|
|
179
|
+
|
|
180
|
+
<tr>
|
|
181
|
+
<td rowspan="1" colSpan="1" >[startSpeakerDeviceTest:](https://write.woa.com/document/87029847188574208)</td>
|
|
182
|
+
|
|
183
|
+
<td rowspan="1" colSpan="1" >Start speaker testing (only for desktop terminal)</td>
|
|
184
|
+
</tr>
|
|
185
|
+
|
|
186
|
+
<tr>
|
|
187
|
+
<td rowspan="1" colSpan="1" >[stopSpeakerDeviceTest](https://write.woa.com/document/87029847188574208)</td>
|
|
188
|
+
|
|
189
|
+
<td rowspan="1" colSpan="1" >End speaker testing (only for desktop terminal)</td>
|
|
190
|
+
</tr>
|
|
191
|
+
|
|
192
|
+
<tr>
|
|
193
|
+
<td rowspan="1" colSpan="1" >[setObserver:](https://write.woa.com/document/87029847188574208)</td>
|
|
194
|
+
|
|
195
|
+
<td rowspan="1" colSpan="1" >Device hot swap callback (only for macOS System)</td>
|
|
196
|
+
</tr>
|
|
197
|
+
|
|
198
|
+
<tr>
|
|
199
|
+
<td rowspan="1" colSpan="1" >[setCameraCapturerParam:](https://write.woa.com/document/87029847188574208)</td>
|
|
200
|
+
|
|
201
|
+
<td rowspan="1" colSpan="1" >Set camera capture preferences</td>
|
|
202
|
+
</tr>
|
|
203
|
+
|
|
204
|
+
<tr>
|
|
205
|
+
<td rowspan="1" colSpan="1" >[setSystemVolumeType:](https://write.woa.com/document/87029847188574208)</td>
|
|
206
|
+
|
|
207
|
+
<td rowspan="1" colSpan="1" >Set system volume type (only for mobile terminal)</td>
|
|
208
|
+
</tr>
|
|
209
|
+
</table>
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
## Struct Type
|
|
213
|
+
<table>
|
|
214
|
+
<tr>
|
|
215
|
+
<td rowspan="1" colSpan="1" >Function List</td>
|
|
216
|
+
|
|
217
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
218
|
+
</tr>
|
|
219
|
+
|
|
220
|
+
<tr>
|
|
221
|
+
<td rowspan="1" colSpan="1" >[TXCameraCaptureParam](https://write.woa.com/document/87029847188574208)</td>
|
|
222
|
+
|
|
223
|
+
<td rowspan="1" colSpan="1" >Camera collection parameters</td>
|
|
224
|
+
</tr>
|
|
225
|
+
|
|
226
|
+
<tr>
|
|
227
|
+
<td rowspan="1" colSpan="1" >[TXMediaDeviceInfo](https://write.woa.com/document/87029847188574208)</td>
|
|
228
|
+
|
|
229
|
+
<td rowspan="1" colSpan="1" >Information related to audio and video equipment (only for desktop platform)</td>
|
|
230
|
+
</tr>
|
|
231
|
+
</table>
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
## Enumeration Types
|
|
235
|
+
<table>
|
|
236
|
+
<tr>
|
|
237
|
+
<td rowspan="1" colSpan="1" >Enumeration Types</td>
|
|
238
|
+
|
|
239
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
240
|
+
</tr>
|
|
241
|
+
|
|
242
|
+
<tr>
|
|
243
|
+
<td rowspan="1" colSpan="1" >[TXSystemVolumeType](https://write.woa.com/document/87029847188574208)</td>
|
|
244
|
+
|
|
245
|
+
<td rowspan="1" colSpan="1" >System volume type (only for mobile devices)</td>
|
|
246
|
+
</tr>
|
|
247
|
+
|
|
248
|
+
<tr>
|
|
249
|
+
<td rowspan="1" colSpan="1" >[TXAudioRoute](https://write.woa.com/document/87029847188574208)</td>
|
|
250
|
+
|
|
251
|
+
<td rowspan="1" colSpan="1" >Audio routing (i.e., sound playback mode)</td>
|
|
252
|
+
</tr>
|
|
253
|
+
|
|
254
|
+
<tr>
|
|
255
|
+
<td rowspan="1" colSpan="1" >[TXMediaDeviceType](https://write.woa.com/document/87029847188574208)</td>
|
|
256
|
+
|
|
257
|
+
<td rowspan="1" colSpan="1" >Device type (only for desktop platform)</td>
|
|
258
|
+
</tr>
|
|
259
|
+
|
|
260
|
+
<tr>
|
|
261
|
+
<td rowspan="1" colSpan="1" >[TXMediaDeviceState](https://write.woa.com/document/87029847188574208)</td>
|
|
262
|
+
|
|
263
|
+
<td rowspan="1" colSpan="1" >Device operations</td>
|
|
264
|
+
</tr>
|
|
265
|
+
|
|
266
|
+
<tr>
|
|
267
|
+
<td rowspan="1" colSpan="1" >[TXCameraCaptureMode](https://write.woa.com/document/87029847188574208)</td>
|
|
268
|
+
|
|
269
|
+
<td rowspan="1" colSpan="1" >Camera capture preferences</td>
|
|
270
|
+
</tr>
|
|
271
|
+
</table>
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
## onDeviceChanged:type:state:
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
#### Local device connection status has changed (applicable only to desktop systems)
|
|
279
|
+
|
|
280
|
+
When local devices (including camera, microphone, and speaker) are plugged in or unplugged, the SDK will trigger this event callback.
|
|
281
|
+
<table>
|
|
282
|
+
<tr>
|
|
283
|
+
<td rowspan="1" colSpan="1" >Parameters</td>
|
|
284
|
+
|
|
285
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
286
|
+
</tr>
|
|
287
|
+
|
|
288
|
+
<tr>
|
|
289
|
+
<td rowspan="1" colSpan="1" >deviceId</td>
|
|
290
|
+
|
|
291
|
+
<td rowspan="1" colSpan="1" >Device ID</td>
|
|
292
|
+
</tr>
|
|
293
|
+
|
|
294
|
+
<tr>
|
|
295
|
+
<td rowspan="1" colSpan="1" >state</td>
|
|
296
|
+
|
|
297
|
+
<td rowspan="1" colSpan="1" >On/Off status, 0: Device added; 1: Device removed; 2: Device enabled.</td>
|
|
298
|
+
</tr>
|
|
299
|
+
|
|
300
|
+
<tr>
|
|
301
|
+
<td rowspan="1" colSpan="1" >type</td>
|
|
302
|
+
|
|
303
|
+
<td rowspan="1" colSpan="1" >Device Type</td>
|
|
304
|
+
</tr>
|
|
305
|
+
</table>
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
## isFrontCamera
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
#### Determine whether the current camera is front-facing (only for mobile terminal)
|
|
313
|
+
|
|
314
|
+
## switchCamera:
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
#### Switch between front and rear cameras (only for mobile terminal)
|
|
319
|
+
|
|
320
|
+
## isCameraZoomSupported
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
#### Check if the current camera supports scaling (only for mobile terminal)
|
|
325
|
+
|
|
326
|
+
## getCameraZoomMaxRatio
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
#### Get the maximum zoom level of the camera (only for mobile terminal)
|
|
331
|
+
|
|
332
|
+
## setCameraZoomRatio:
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
#### Set the zoom level of the camera (only for mobile terminal)
|
|
337
|
+
<table>
|
|
338
|
+
<tr>
|
|
339
|
+
<td rowspan="1" colSpan="1" >Parameters</td>
|
|
340
|
+
|
|
341
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
342
|
+
</tr>
|
|
343
|
+
|
|
344
|
+
<tr>
|
|
345
|
+
<td rowspan="1" colSpan="1" >zoomRatio</td>
|
|
346
|
+
|
|
347
|
+
<td rowspan="1" colSpan="1" >Value range 1 - 5, with 1 representing the farthest view (normal lens) and 5 representing the closest view (magnifier lens). The recommended maximum value is 5; exceeding 5 may cause video data to become blurry.</td>
|
|
348
|
+
</tr>
|
|
349
|
+
</table>
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
## isAutoFocusEnabled
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
#### Check if automatic face position recognition is supported (only for mobile terminal)
|
|
357
|
+
|
|
358
|
+
## enableCameraAutoFocus:
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
#### Enable autofocus feature (only for mobile terminal)
|
|
363
|
+
|
|
364
|
+
Once enabled, the SDK will automatically detect the face position in the frame and keep the camera focus on the face position.
|
|
365
|
+
|
|
366
|
+
## setCameraFocusPosition:
|
|
367
|
+
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
#### Set the focus position of the camera (only for mobile terminal)
|
|
371
|
+
|
|
372
|
+
You can achieve the following interactions with this interface:
|
|
373
|
+
|
|
374
|
+
1. Allow users to click on the local camera preview screen.
|
|
375
|
+
|
|
376
|
+
2. Display a rectangular box at the click position to indicate that the camera will focus on this point.
|
|
377
|
+
|
|
378
|
+
3. Then, pass the coordinates of the user's click position through this interface to the SDK. The SDK will control the camera to focus on the user's desired location.
|
|
379
|
+
<table>
|
|
380
|
+
<tr>
|
|
381
|
+
<td rowspan="1" colSpan="1" >Parameters</td>
|
|
382
|
+
|
|
383
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
384
|
+
</tr>
|
|
385
|
+
|
|
386
|
+
<tr>
|
|
387
|
+
<td rowspan="1" colSpan="1" >position</td>
|
|
388
|
+
|
|
389
|
+
<td rowspan="1" colSpan="1" >Focus position, please pass the coordinates of the desired focus point</td>
|
|
390
|
+
</tr>
|
|
391
|
+
</table>
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
> **Note**
|
|
395
|
+
>
|
|
396
|
+
|
|
397
|
+
> The prerequisite for using this interface is to disable the auto-focus feature through [enableCameraAutoFocus](https://write.woa.com/document/87029847188574208).
|
|
398
|
+
>
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
#### Return value description:
|
|
402
|
+
|
|
403
|
+
0: Operation successful; Negative value: Operation failed.
|
|
404
|
+
|
|
405
|
+
## isCameraTorchSupported
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
|
|
409
|
+
#### Check if the flash can be turned on (only for mobile terminal)
|
|
410
|
+
|
|
411
|
+
## enableCameraTorch:
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
#### Turn the flash on/off, also known as flashlight mode (only for mobile terminal)
|
|
416
|
+
|
|
417
|
+
## setAudioRoute:
|
|
418
|
+
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+
#### Set audio routing (only for mobile terminal)
|
|
422
|
+
|
|
423
|
+
A phone has two audio playback devices: one is the earpiece at the top of the phone, and the other is the stereo speaker at the bottom of the phone.
|
|
424
|
+
|
|
425
|
+
When the audio routing is set to the earpiece, the sound is relatively low, and you need to bring your ear close to hear it clearly, ensuring better privacy. It is suitable for phone calls.
|
|
426
|
+
|
|
427
|
+
When the audio routing is set to the speaker, the sound is relatively loud. You can hear it clearly without holding the phone to your face, thus enabling the "hands-free" feature.
|
|
428
|
+
|
|
429
|
+
## setExposureCompensation:
|
|
430
|
+
|
|
431
|
+
|
|
432
|
+
|
|
433
|
+
#### Set the exposure parameters of the camera, ranging from -1 to 1
|
|
434
|
+
|
|
435
|
+
## getDevicesList:
|
|
436
|
+
|
|
437
|
+
|
|
438
|
+
|
|
439
|
+
#### Get the device list (only for desktop terminal)
|
|
440
|
+
<table>
|
|
441
|
+
<tr>
|
|
442
|
+
<td rowspan="1" colSpan="1" >Parameters</td>
|
|
443
|
+
|
|
444
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
445
|
+
</tr>
|
|
446
|
+
|
|
447
|
+
<tr>
|
|
448
|
+
<td rowspan="1" colSpan="1" >type</td>
|
|
449
|
+
|
|
450
|
+
<td rowspan="1" colSpan="1" >Device type, specify which type of device list to retrieve. See TXMediaDeviceType Definition for details.</td>
|
|
451
|
+
</tr>
|
|
452
|
+
</table>
|
|
453
|
+
|
|
454
|
+
|
|
455
|
+
> **Note**
|
|
456
|
+
>
|
|
457
|
+
> - After use, please call the release method to release resources so that the SDK can maintain the lifecycle of the ITXDeviceCollection object.
|
|
458
|
+
> - Do not use delete to release the returned Collection object. Deleting the ITXDeviceCollection* pointer will cause an abnormal crash.
|
|
459
|
+
> - type only supports TXMediaDeviceTypeMic, TXMediaDeviceTypeSpeaker, TXMediaDeviceTypeCamera.
|
|
460
|
+
> - This interface only supports Mac and Windows platforms.
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
## setCurrentDevice:deviceId:
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
|
|
467
|
+
#### Set the current device to use (only for desktop terminal)
|
|
468
|
+
<table>
|
|
469
|
+
<tr>
|
|
470
|
+
<td rowspan="1" colSpan="1" >Parameters</td>
|
|
471
|
+
|
|
472
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
473
|
+
</tr>
|
|
474
|
+
|
|
475
|
+
<tr>
|
|
476
|
+
<td rowspan="1" colSpan="1" >deviceId</td>
|
|
477
|
+
|
|
478
|
+
<td rowspan="1" colSpan="1" >Device ID, you can obtain the device ID through the [getDevicesList](https://write.woa.com/document/87029847188574208) interface.</td>
|
|
479
|
+
</tr>
|
|
480
|
+
|
|
481
|
+
<tr>
|
|
482
|
+
<td rowspan="1" colSpan="1" >type</td>
|
|
483
|
+
|
|
484
|
+
<td rowspan="1" colSpan="1" >Device type, see TXMediaDeviceType Definition for details.</td>
|
|
485
|
+
</tr>
|
|
486
|
+
</table>
|
|
487
|
+
|
|
488
|
+
|
|
489
|
+
#### Return value description:
|
|
490
|
+
|
|
491
|
+
0: Operation successful; Negative value: Operation failed.
|
|
492
|
+
|
|
493
|
+
## getCurrentDevice:
|
|
494
|
+
|
|
495
|
+
|
|
496
|
+
|
|
497
|
+
#### Get the current device in use (only for desktop terminal)
|
|
498
|
+
|
|
499
|
+
## setCurrentDeviceVolume:deviceType:
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
|
|
503
|
+
#### Set the current device volume (only for desktop terminal)
|
|
504
|
+
|
|
505
|
+
The volume here refers to the capture volume of the microphone or the playback volume of the speaker. The camera does not support setting the volume.
|
|
506
|
+
<table>
|
|
507
|
+
<tr>
|
|
508
|
+
<td rowspan="1" colSpan="1" >Parameters</td>
|
|
509
|
+
|
|
510
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
511
|
+
</tr>
|
|
512
|
+
|
|
513
|
+
<tr>
|
|
514
|
+
<td rowspan="1" colSpan="1" >volume</td>
|
|
515
|
+
|
|
516
|
+
<td rowspan="1" colSpan="1" >Volume. Value range: 0-100. Default value: 100.</td>
|
|
517
|
+
</tr>
|
|
518
|
+
</table>
|
|
519
|
+
|
|
520
|
+
|
|
521
|
+
## getCurrentDeviceVolume:
|
|
522
|
+
|
|
523
|
+
|
|
524
|
+
|
|
525
|
+
#### Get the current device volume (only for desktop terminal)
|
|
526
|
+
|
|
527
|
+
The volume here refers to the capture volume of the microphone or the playback volume of the speaker. The camera does not support retrieving the volume.
|
|
528
|
+
|
|
529
|
+
## setCurrentDeviceMute:deviceType:
|
|
530
|
+
|
|
531
|
+
|
|
532
|
+
|
|
533
|
+
#### Set the mute status of the current device (only for desktop terminal)
|
|
534
|
+
|
|
535
|
+
The volume here refers to the microphone and speaker, and the camera does not support silent operation.
|
|
536
|
+
|
|
537
|
+
## getCurrentDeviceMute:
|
|
538
|
+
|
|
539
|
+
|
|
540
|
+
|
|
541
|
+
#### Get the mute status of the current device (only for desktop terminal)
|
|
542
|
+
|
|
543
|
+
The volume here refers to the microphone and speaker, and the camera does not support silent operation.
|
|
544
|
+
|
|
545
|
+
## enableFollowingDefaultAudioDevice:enable:
|
|
546
|
+
|
|
547
|
+
|
|
548
|
+
|
|
549
|
+
#### Set SDK to use the audio device according to the default system device (only for desktop terminal)
|
|
550
|
+
|
|
551
|
+
Only microphone and speaker types are supported. The camera does not yet support following the system default device
|
|
552
|
+
<table>
|
|
553
|
+
<tr>
|
|
554
|
+
<td rowspan="1" colSpan="1" >Parameters</td>
|
|
555
|
+
|
|
556
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
557
|
+
</tr>
|
|
558
|
+
|
|
559
|
+
<tr>
|
|
560
|
+
<td rowspan="1" colSpan="1" >enable</td>
|
|
561
|
+
|
|
562
|
+
<td rowspan="1" colSpan="1" >Whether to follow the system default audio device.<br>- true: Follow. When the system default audio device changes or a new audio device is plugged in, the SDK will immediately switch the audio device.<br>- false: Do not follow. When the system default audio device changes or a new audio device is plugged in, the SDK will not switch the audio device.</td>
|
|
563
|
+
</tr>
|
|
564
|
+
|
|
565
|
+
<tr>
|
|
566
|
+
<td rowspan="1" colSpan="1" >type</td>
|
|
567
|
+
|
|
568
|
+
<td rowspan="1" colSpan="1" >Device type, see TXMediaDeviceType Definition for details.</td>
|
|
569
|
+
</tr>
|
|
570
|
+
</table>
|
|
571
|
+
|
|
572
|
+
|
|
573
|
+
## startCameraDeviceTest:
|
|
574
|
+
|
|
575
|
+
|
|
576
|
+
|
|
577
|
+
#### Start camera testing (only for desktop terminal)
|
|
578
|
+
|
|
579
|
+
> **Note**
|
|
580
|
+
>
|
|
581
|
+
|
|
582
|
+
> During testing, you can use the [setCurrentDevice](https://write.woa.com/document/87029847188574208) interface to switch cameras.
|
|
583
|
+
>
|
|
584
|
+
|
|
585
|
+
|
|
586
|
+
## stopCameraDeviceTest
|
|
587
|
+
|
|
588
|
+
|
|
589
|
+
|
|
590
|
+
#### End camera testing (only for desktop terminal)
|
|
591
|
+
|
|
592
|
+
## startMicDeviceTest:
|
|
593
|
+
|
|
594
|
+
|
|
595
|
+
|
|
596
|
+
#### Start mic testing (only for desktop terminal)
|
|
597
|
+
|
|
598
|
+
This interface can test whether the microphone is working properly. The volume of the microphone's audio stream will be notified to you via callback, with the volume range being 0 to 100.
|
|
599
|
+
<table>
|
|
600
|
+
<tr>
|
|
601
|
+
<td rowspan="1" colSpan="1" >Parameters</td>
|
|
602
|
+
|
|
603
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
604
|
+
</tr>
|
|
605
|
+
|
|
606
|
+
<tr>
|
|
607
|
+
<td rowspan="1" colSpan="1" >interval</td>
|
|
608
|
+
|
|
609
|
+
<td rowspan="1" colSpan="1" >Microphone volume callback interval.</td>
|
|
610
|
+
</tr>
|
|
611
|
+
</table>
|
|
612
|
+
|
|
613
|
+
|
|
614
|
+
> **Note**
|
|
615
|
+
>
|
|
616
|
+
|
|
617
|
+
> After invoking this interface, the recorded microphone sound will be played back through the speaker by default.
|
|
618
|
+
>
|
|
619
|
+
|
|
620
|
+
|
|
621
|
+
## startMicDeviceTest:playback:
|
|
622
|
+
|
|
623
|
+
|
|
624
|
+
|
|
625
|
+
#### Start mic testing (only for desktop terminal)
|
|
626
|
+
|
|
627
|
+
This interface can test whether the microphone is working properly. The volume of the microphone's audio stream will be notified to you via callback, with the volume range being 0 to 100.
|
|
628
|
+
<table>
|
|
629
|
+
<tr>
|
|
630
|
+
<td rowspan="1" colSpan="1" >Parameters</td>
|
|
631
|
+
|
|
632
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
633
|
+
</tr>
|
|
634
|
+
|
|
635
|
+
<tr>
|
|
636
|
+
<td rowspan="1" colSpan="1" >interval</td>
|
|
637
|
+
|
|
638
|
+
<td rowspan="1" colSpan="1" >Microphone volume callback interval.</td>
|
|
639
|
+
</tr>
|
|
640
|
+
|
|
641
|
+
<tr>
|
|
642
|
+
<td rowspan="1" colSpan="1" >playback</td>
|
|
643
|
+
|
|
644
|
+
<td rowspan="1" colSpan="1" >Whether to enable microphone sound playback. When enabled, users will hear their own voice during microphone testing.</td>
|
|
645
|
+
</tr>
|
|
646
|
+
</table>
|
|
647
|
+
|
|
648
|
+
|
|
649
|
+
## stopMicDeviceTest
|
|
650
|
+
|
|
651
|
+
|
|
652
|
+
|
|
653
|
+
#### End mic testing (only for desktop terminal)
|
|
654
|
+
|
|
655
|
+
## startSpeakerDeviceTest:
|
|
656
|
+
|
|
657
|
+
|
|
658
|
+
|
|
659
|
+
#### Start speaker testing (only for desktop terminal)
|
|
660
|
+
|
|
661
|
+
This interface tests the playback device by playing a specified audio file. If the user hears sound during the test, it means the playback device is working properly.
|
|
662
|
+
<table>
|
|
663
|
+
<tr>
|
|
664
|
+
<td rowspan="1" colSpan="1" >Parameters</td>
|
|
665
|
+
|
|
666
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
667
|
+
</tr>
|
|
668
|
+
|
|
669
|
+
<tr>
|
|
670
|
+
<td rowspan="1" colSpan="1" >filePath</td>
|
|
671
|
+
|
|
672
|
+
<td rowspan="1" colSpan="1" >Path to the audio file</td>
|
|
673
|
+
</tr>
|
|
674
|
+
</table>
|
|
675
|
+
|
|
676
|
+
|
|
677
|
+
## stopSpeakerDeviceTest
|
|
678
|
+
|
|
679
|
+
|
|
680
|
+
|
|
681
|
+
#### End speaker testing (only for desktop terminal)
|
|
682
|
+
|
|
683
|
+
## setObserver:
|
|
684
|
+
|
|
685
|
+
|
|
686
|
+
|
|
687
|
+
#### Device hot swap callback (only for macOS System)
|
|
688
|
+
|
|
689
|
+
## setCameraCapturerParam:
|
|
690
|
+
|
|
691
|
+
|
|
692
|
+
|
|
693
|
+
#### Set camera capture preferences
|
|
694
|
+
|
|
695
|
+
## setSystemVolumeType:
|
|
696
|
+
|
|
697
|
+
|
|
698
|
+
|
|
699
|
+
#### Set system volume type (only for mobile terminal)
|
|
700
|
+
|
|
701
|
+
@deprecated Not recommended starting from version 9.5. It is advised to use the startLocalAudio(quality) interface in ` TRTCCloud ` as a replacement, and decide the sound quality via the quality parameter.
|
|
702
|
+
|
|
703
|
+
## TXSystemVolumeType(Deprecated)
|
|
704
|
+
|
|
705
|
+
|
|
706
|
+
|
|
707
|
+
#### System volume type (only for mobile devices)
|
|
708
|
+
|
|
709
|
+
@deprecated Not recommended starting from version 9.5.
|
|
710
|
+
|
|
711
|
+
|
|
712
|
+
|
|
713
|
+
Modern smartphones generally have two sets of system volume types, namely "Call volume" and "Media volume".
|
|
714
|
+
- Call Volume: A volume type designed specifically for making and receiving phone calls, featuring built-in echo cancellation (AEC), and supporting microphone input via Bluetooth headphones. However, the sound quality is relatively average.
|
|
715
|
+
|
|
716
|
+
|
|
717
|
+
If you press the volume button on the side of your phone to lower the volume and it cannot be set to zero (completely silent), it indicates that your phone is currently in Call Volume mode.
|
|
718
|
+
- Media Volume: A volume type designed specifically for music scenarios, which cannot use the system's AEC feature, and does not support microphone input via Bluetooth headphones, but provides better music playback quality.
|
|
719
|
+
|
|
720
|
+
|
|
721
|
+
If you press the volume button on the side of your phone to lower the volume and it can be set to completely silent, it indicates that your phone is currently in Media Volume mode.
|
|
722
|
+
|
|
723
|
+
|
|
724
|
+
|
|
725
|
+
The SDK currently provides three control modes for system volume types: automatic switching mode, full-time call volume mode, and full-time media volume mode.
|
|
726
|
+
<table>
|
|
727
|
+
<tr>
|
|
728
|
+
<td rowspan="1" colSpan="1" >Enumeration</td>
|
|
729
|
+
|
|
730
|
+
<td rowspan="1" colSpan="1" >Value</td>
|
|
731
|
+
|
|
732
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
733
|
+
</tr>
|
|
734
|
+
|
|
735
|
+
<tr>
|
|
736
|
+
<td rowspan="1" colSpan="1" >TXSystemVolumeTypeAuto</td>
|
|
737
|
+
|
|
738
|
+
<td rowspan="1" colSpan="1" >0</td>
|
|
739
|
+
|
|
740
|
+
<td rowspan="1" colSpan="1" >Automatic Switching Mode</td>
|
|
741
|
+
</tr>
|
|
742
|
+
|
|
743
|
+
<tr>
|
|
744
|
+
<td rowspan="1" colSpan="1" >TXSystemVolumeTypeMedia</td>
|
|
745
|
+
|
|
746
|
+
<td rowspan="1" colSpan="1" >1</td>
|
|
747
|
+
|
|
748
|
+
<td rowspan="1" colSpan="1" >Full Media Volume</td>
|
|
749
|
+
</tr>
|
|
750
|
+
|
|
751
|
+
<tr>
|
|
752
|
+
<td rowspan="1" colSpan="1" >TXSystemVolumeTypeVOIP</td>
|
|
753
|
+
|
|
754
|
+
<td rowspan="1" colSpan="1" >2</td>
|
|
755
|
+
|
|
756
|
+
<td rowspan="1" colSpan="1" >Full Call Volume</td>
|
|
757
|
+
</tr>
|
|
758
|
+
</table>
|
|
759
|
+
|
|
760
|
+
|
|
761
|
+
## TXAudioRoute
|
|
762
|
+
|
|
763
|
+
|
|
764
|
+
|
|
765
|
+
#### Audio routing (i.e., sound playback mode)
|
|
766
|
+
|
|
767
|
+
Audio routing refers to whether the sound is played through the phone's speaker or receiver, and thus this interface is only applicable to mobile devices such as smartphones.
|
|
768
|
+
|
|
769
|
+
A mobile phone has two speakers: one is the earpiece located at the top of the phone, and the other is the stereo speaker located at the bottom.
|
|
770
|
+
- When the audio routing is set to the earpiece, the sound is relatively low, and you need to bring your ear close to hear it clearly, ensuring better privacy. It is suitable for phone calls.
|
|
771
|
+
|
|
772
|
+
- When the audio routing is set to the speaker, the sound is relatively loud. You can hear it clearly without holding the phone to your face, thus enabling the "hands-free" feature.
|
|
773
|
+
|
|
774
|
+
<table>
|
|
775
|
+
<tr>
|
|
776
|
+
<td rowspan="1" colSpan="1" >Enumeration</td>
|
|
777
|
+
|
|
778
|
+
<td rowspan="1" colSpan="1" >Value</td>
|
|
779
|
+
|
|
780
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
781
|
+
</tr>
|
|
782
|
+
|
|
783
|
+
<tr>
|
|
784
|
+
<td rowspan="1" colSpan="1" >TXAudioRouteSpeakerphone</td>
|
|
785
|
+
|
|
786
|
+
<td rowspan="1" colSpan="1" >0</td>
|
|
787
|
+
|
|
788
|
+
<td rowspan="1" colSpan="1" >Speakerphone: Plays through the speaker (i.e., "hands-free"), located at the bottom of the phone, with a louder volume, suitable for playing music aloud.</td>
|
|
789
|
+
</tr>
|
|
790
|
+
|
|
791
|
+
<tr>
|
|
792
|
+
<td rowspan="1" colSpan="1" >TXAudioRouteEarpiece</td>
|
|
793
|
+
|
|
794
|
+
<td rowspan="1" colSpan="1" >1</td>
|
|
795
|
+
|
|
796
|
+
<td rowspan="1" colSpan="1" >Earpiece: Use the earpiece to play audio. The earpiece is located at the top of the phone and produces a low volume, making it suitable for privacy-sensitive call scenarios.</td>
|
|
797
|
+
</tr>
|
|
798
|
+
</table>
|
|
799
|
+
|
|
800
|
+
|
|
801
|
+
## TXMediaDeviceType
|
|
802
|
+
|
|
803
|
+
|
|
804
|
+
|
|
805
|
+
#### Device type (only for desktop platform)
|
|
806
|
+
|
|
807
|
+
|
|
808
|
+
|
|
809
|
+
This enumeration value is used for the three types of audio and video devices in Definition: camera, microphone, and speaker, allowing a single device management interface to control different types of devices.
|
|
810
|
+
<table>
|
|
811
|
+
<tr>
|
|
812
|
+
<td rowspan="1" colSpan="1" >Enumeration</td>
|
|
813
|
+
|
|
814
|
+
<td rowspan="1" colSpan="1" >Value</td>
|
|
815
|
+
|
|
816
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
817
|
+
</tr>
|
|
818
|
+
|
|
819
|
+
<tr>
|
|
820
|
+
<td rowspan="1" colSpan="1" >TXMediaDeviceTypeUnknown</td>
|
|
821
|
+
|
|
822
|
+
<td rowspan="1" colSpan="1" >-1</td>
|
|
823
|
+
|
|
824
|
+
<td rowspan="1" colSpan="1" >Undefined device type</td>
|
|
825
|
+
</tr>
|
|
826
|
+
|
|
827
|
+
<tr>
|
|
828
|
+
<td rowspan="1" colSpan="1" >TXMediaDeviceTypeAudioInput</td>
|
|
829
|
+
|
|
830
|
+
<td rowspan="1" colSpan="1" >0</td>
|
|
831
|
+
|
|
832
|
+
<td rowspan="1" colSpan="1" >Microphone-type device</td>
|
|
833
|
+
</tr>
|
|
834
|
+
|
|
835
|
+
<tr>
|
|
836
|
+
<td rowspan="1" colSpan="1" >TXMediaDeviceTypeAudioOutput</td>
|
|
837
|
+
|
|
838
|
+
<td rowspan="1" colSpan="1" >1</td>
|
|
839
|
+
|
|
840
|
+
<td rowspan="1" colSpan="1" >Speaker-type device</td>
|
|
841
|
+
</tr>
|
|
842
|
+
|
|
843
|
+
<tr>
|
|
844
|
+
<td rowspan="1" colSpan="1" >TXMediaDeviceTypeVideoCamera</td>
|
|
845
|
+
|
|
846
|
+
<td rowspan="1" colSpan="1" >2</td>
|
|
847
|
+
|
|
848
|
+
<td rowspan="1" colSpan="1" >Camera-type device</td>
|
|
849
|
+
</tr>
|
|
850
|
+
</table>
|
|
851
|
+
|
|
852
|
+
|
|
853
|
+
## TXMediaDeviceState
|
|
854
|
+
|
|
855
|
+
|
|
856
|
+
|
|
857
|
+
#### Device operations
|
|
858
|
+
|
|
859
|
+
This enumeration value is used for local device status change notifications [onDeviceChanged](https://write.woa.com/document/87029847188574208).
|
|
860
|
+
<table>
|
|
861
|
+
<tr>
|
|
862
|
+
<td rowspan="1" colSpan="1" >Enumeration</td>
|
|
863
|
+
|
|
864
|
+
<td rowspan="1" colSpan="1" >Value</td>
|
|
865
|
+
|
|
866
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
867
|
+
</tr>
|
|
868
|
+
|
|
869
|
+
<tr>
|
|
870
|
+
<td rowspan="1" colSpan="1" >TXMediaDeviceStateAdd</td>
|
|
871
|
+
|
|
872
|
+
<td rowspan="1" colSpan="1" >0</td>
|
|
873
|
+
|
|
874
|
+
<td rowspan="1" colSpan="1" >Device inserted</td>
|
|
875
|
+
</tr>
|
|
876
|
+
|
|
877
|
+
<tr>
|
|
878
|
+
<td rowspan="1" colSpan="1" >TXMediaDeviceStateRemove</td>
|
|
879
|
+
|
|
880
|
+
<td rowspan="1" colSpan="1" >1</td>
|
|
881
|
+
|
|
882
|
+
<td rowspan="1" colSpan="1" >Device removed</td>
|
|
883
|
+
</tr>
|
|
884
|
+
|
|
885
|
+
<tr>
|
|
886
|
+
<td rowspan="1" colSpan="1" >TXMediaDeviceStateActive</td>
|
|
887
|
+
|
|
888
|
+
<td rowspan="1" colSpan="1" >2</td>
|
|
889
|
+
|
|
890
|
+
<td rowspan="1" colSpan="1" >Device enabled</td>
|
|
891
|
+
</tr>
|
|
892
|
+
|
|
893
|
+
<tr>
|
|
894
|
+
<td rowspan="1" colSpan="1" >TXMediaDefaultDeviceChanged</td>
|
|
895
|
+
|
|
896
|
+
<td rowspan="1" colSpan="1" >3</td>
|
|
897
|
+
|
|
898
|
+
<td rowspan="1" colSpan="1" >System default device changed</td>
|
|
899
|
+
</tr>
|
|
900
|
+
</table>
|
|
901
|
+
|
|
902
|
+
|
|
903
|
+
## TXCameraCaptureMode
|
|
904
|
+
|
|
905
|
+
|
|
906
|
+
|
|
907
|
+
#### Camera capture preferences
|
|
908
|
+
|
|
909
|
+
This enumeration type is used for camera collection parameter settings.
|
|
910
|
+
<table>
|
|
911
|
+
<tr>
|
|
912
|
+
<td rowspan="1" colSpan="1" >Enumeration</td>
|
|
913
|
+
|
|
914
|
+
<td rowspan="1" colSpan="1" >Value</td>
|
|
915
|
+
|
|
916
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
917
|
+
</tr>
|
|
918
|
+
|
|
919
|
+
<tr>
|
|
920
|
+
<td rowspan="1" colSpan="1" >TXCameraResolutionStrategyAuto</td>
|
|
921
|
+
|
|
922
|
+
<td rowspan="1" colSpan="1" >0</td>
|
|
923
|
+
|
|
924
|
+
<td rowspan="1" colSpan="1" >Auto-adjust collection parameters.<br>The SDK selects appropriate camera output parameters based on the performance of the actual capture device and network conditions, maintaining a balance between device performance and video preview quality.</td>
|
|
925
|
+
</tr>
|
|
926
|
+
|
|
927
|
+
<tr>
|
|
928
|
+
<td rowspan="1" colSpan="1" >TXCameraResolutionStrategyPerformance</td>
|
|
929
|
+
|
|
930
|
+
<td rowspan="1" colSpan="1" >Not Defined</td>
|
|
931
|
+
|
|
932
|
+
<td rowspan="1" colSpan="1" >Prioritize device performance.<br>The SDK selects the closest camera output parameters based on the encoder resolution and frame rate set by the user, thus ensuring device performance.</td>
|
|
933
|
+
</tr>
|
|
934
|
+
|
|
935
|
+
<tr>
|
|
936
|
+
<td rowspan="1" colSpan="1" >TXCameraResolutionStrategyHighQuality</td>
|
|
937
|
+
|
|
938
|
+
<td rowspan="1" colSpan="1" >Not Defined</td>
|
|
939
|
+
|
|
940
|
+
<td rowspan="1" colSpan="1" >Priority is given to ensuring video preview quality.<br>The SDK selects higher camera output parameters to improve the quality of preview video. In this case, more CPU and memory will be consumed for video preprocessing.</td>
|
|
941
|
+
</tr>
|
|
942
|
+
|
|
943
|
+
<tr>
|
|
944
|
+
<td rowspan="1" colSpan="1" >TXCameraCaptureManual</td>
|
|
945
|
+
|
|
946
|
+
<td rowspan="1" colSpan="1" >Not Defined</td>
|
|
947
|
+
|
|
948
|
+
<td rowspan="1" colSpan="1" >Users are allowed to set the video aspect ratio captured by the local camera.</td>
|
|
949
|
+
</tr>
|
|
950
|
+
</table>
|
|
951
|
+
|
|
952
|
+
|
|
953
|
+
## TXCameraCaptureParam
|
|
954
|
+
|
|
955
|
+
|
|
956
|
+
|
|
957
|
+
#### Camera collection parameters
|
|
958
|
+
|
|
959
|
+
This setting determines the image quality of the local preview.
|
|
960
|
+
<table>
|
|
961
|
+
<tr>
|
|
962
|
+
<td rowspan="1" colSpan="1" >Enumeration Types</td>
|
|
963
|
+
|
|
964
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
965
|
+
</tr>
|
|
966
|
+
|
|
967
|
+
<tr>
|
|
968
|
+
<td rowspan="1" colSpan="1" >height</td>
|
|
969
|
+
|
|
970
|
+
<td rowspan="1" colSpan="1" >**Field Definition:** Captured Image Width</td>
|
|
971
|
+
</tr>
|
|
972
|
+
|
|
973
|
+
<tr>
|
|
974
|
+
<td rowspan="1" colSpan="1" >mode</td>
|
|
975
|
+
|
|
976
|
+
<td rowspan="1" colSpan="1" >**Field Definition:** Camera Capture Preferences, refer to [TXCameraCaptureMode](https://write.woa.com/document/87029847188574208)</td>
|
|
977
|
+
</tr>
|
|
978
|
+
|
|
979
|
+
<tr>
|
|
980
|
+
<td rowspan="1" colSpan="1" >width</td>
|
|
981
|
+
|
|
982
|
+
<td rowspan="1" colSpan="1" >**Field Definition:** Captured Image Length</td>
|
|
983
|
+
</tr>
|
|
984
|
+
</table>
|
|
985
|
+
|
|
986
|
+
|
|
987
|
+
## TXMediaDeviceInfo
|
|
988
|
+
|
|
989
|
+
|
|
990
|
+
|
|
991
|
+
#### Information related to audio and video equipment (only for desktop platform)
|
|
992
|
+
|
|
993
|
+
This structure is used to describe key information of an audio and video device, such as Device ID, Device Name, etc., so that users can select their desired audio and video device in the user interface.
|
|
994
|
+
<table>
|
|
995
|
+
<tr>
|
|
996
|
+
<td rowspan="1" colSpan="1" >Enumeration Types</td>
|
|
997
|
+
|
|
998
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
999
|
+
</tr>
|
|
1000
|
+
|
|
1001
|
+
<tr>
|
|
1002
|
+
<td rowspan="1" colSpan="1" >deviceId</td>
|
|
1003
|
+
|
|
1004
|
+
<td rowspan="1" colSpan="1" >Device ID (UTF-8)</td>
|
|
1005
|
+
</tr>
|
|
1006
|
+
|
|
1007
|
+
<tr>
|
|
1008
|
+
<td rowspan="1" colSpan="1" >deviceName</td>
|
|
1009
|
+
|
|
1010
|
+
<td rowspan="1" colSpan="1" >Device Name (UTF-8)</td>
|
|
1011
|
+
</tr>
|
|
1012
|
+
|
|
1013
|
+
<tr>
|
|
1014
|
+
<td rowspan="1" colSpan="1" >deviceProperties</td>
|
|
1015
|
+
|
|
1016
|
+
<td rowspan="1" colSpan="1" >Device Attributes</td>
|
|
1017
|
+
</tr>
|
|
1018
|
+
|
|
1019
|
+
<tr>
|
|
1020
|
+
<td rowspan="1" colSpan="1" >type</td>
|
|
1021
|
+
|
|
1022
|
+
<td rowspan="1" colSpan="1" >Device Type</td>
|
|
1023
|
+
</tr>
|
|
1024
|
+
</table>
|