@tencent-rtc/mcp 1.2.9 → 1.3.1

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