@tencentcloud/sdk-mcp 0.1.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.
Files changed (31) hide show
  1. package/README.md +20 -0
  2. package/index.js +16 -0
  3. package/index.js.map +1 -0
  4. package/package.json +37 -0
  5. package/resource/doc/tuicallkit/android/.gitkeep +0 -0
  6. package/resource/doc/tuicallkit/android/api_TUICallKit.md +663 -0
  7. package/resource/doc/tuicallkit/android/api_TUICallObserver.md +786 -0
  8. package/resource/doc/tuicallkit/android/how_to_integrated_android_callkit.md +302 -0
  9. package/resource/doc/tuicallkit/faq/faq.md +1068 -0
  10. package/resource/doc/tuicallkit/flutter/api_TUICallDefine.md +932 -0
  11. package/resource/doc/tuicallkit/flutter/api_TUICallKit.md +452 -0
  12. package/resource/doc/tuicallkit/flutter/api_TUICallObserver.md +926 -0
  13. package/resource/doc/tuicallkit/flutter/how_to_integrated_flutter_callkit.md +226 -0
  14. package/resource/doc/tuicallkit/flutter/how_to_run_flutter_callkit_demo.md +101 -0
  15. package/resource/doc/tuicallkit/iOS/api_TUICallKit.md +635 -0
  16. package/resource/doc/tuicallkit/iOS/api_TUICallObserver.md +779 -0
  17. package/resource/doc/tuicallkit/iOS/how_to_integrated_iOS_callkit.md +269 -0
  18. package/resource/doc/tuicallkit/iOS/how_to_run_iOS_callkit_demo.md +98 -0
  19. package/resource/doc/tuicallkit/react/.gitkeep +0 -0
  20. package/resource/doc/tuicallkit/react/api_TUICallKit.md +1909 -0
  21. package/resource/doc/tuicallkit/react/how_to_integrated_react_callkit.md +195 -0
  22. package/resource/doc/tuicallkit/react/how_to_run_react_callkit_demo.md +93 -0
  23. package/resource/doc/tuicallkit/vue/.gitkeep +0 -0
  24. package/resource/doc/tuicallkit/vue/api_TUICallKit.md +1909 -0
  25. package/resource/doc/tuicallkit/vue/api_TUICallObserver.md +926 -0
  26. package/resource/doc/tuicallkit/vue/how_to_integrated_vue_callkit.md +415 -0
  27. package/resource/doc/tuicallkit/vue/how_to_run_vue_callkit_demo.md +93 -0
  28. package/server.js +124 -0
  29. package/server.js.map +1 -0
  30. package/streamableHttp.js +74 -0
  31. package/streamableHttp.js.map +1 -0
@@ -0,0 +1,779 @@
1
+ ## TUICallObserver API 简介
2
+
3
+ TUICallObserver 是 TUICallEngine 对应的回调事件类,您可以通过此回调,来监听自己感兴趣的回调事件。
4
+
5
+ ## 回调事件概览
6
+ <table>
7
+ <tr>
8
+ <td rowspan="1" colSpan="1" >API</td>
9
+
10
+ <td rowspan="1" colSpan="1" >描述</td>
11
+ </tr>
12
+
13
+ <tr>
14
+ <td rowspan="1" colSpan="1" >[onError](https://cloud.tencent.com/document/product/647/78755#onError)</td>
15
+
16
+ <td rowspan="1" colSpan="1" >通话过程中错误回调</td>
17
+ </tr>
18
+
19
+ <tr>
20
+ <td rowspan="1" colSpan="1" >[onCallReceived](https://cloud.tencent.com/document/product/647/78755#onCallReceived)</td>
21
+
22
+ <td rowspan="1" colSpan="1" >通话请求的回调</td>
23
+ </tr>
24
+
25
+ <tr>
26
+ <td rowspan="1" colSpan="1" >[onCallCancelled](https://cloud.tencent.com/document/product/647/78755#onCallCancelled)</td>
27
+
28
+ <td rowspan="1" colSpan="1" >通话取消的回调</td>
29
+ </tr>
30
+
31
+ <tr>
32
+ <td rowspan="1" colSpan="1" >[onCallEnd](https://cloud.tencent.com/document/product/647/78755#onCallEnd)</td>
33
+
34
+ <td rowspan="1" colSpan="1" >通话结束的回调</td>
35
+ </tr>
36
+
37
+ <tr>
38
+ <td rowspan="1" colSpan="1" >[onCallNotConnected](https://cloud.tencent.com/document/product/647/78755#onCallNotConnected)</td>
39
+
40
+ <td rowspan="1" colSpan="1" >通话未接通的回调</td>
41
+ </tr>
42
+
43
+ <tr>
44
+ <td rowspan="1" colSpan="1" >[onUserReject](https://cloud.tencent.com/document/product/647/78755#onUserReject)</td>
45
+
46
+ <td rowspan="1" colSpan="1" >xxxx 用户拒绝通话的回调</td>
47
+ </tr>
48
+
49
+ <tr>
50
+ <td rowspan="1" colSpan="1" >[onUserNoResponse](https://cloud.tencent.com/document/product/647/78755#onUserNoResponse)</td>
51
+
52
+ <td rowspan="1" colSpan="1" >xxxx 用户不响应的回调</td>
53
+ </tr>
54
+
55
+ <tr>
56
+ <td rowspan="1" colSpan="1" >[onUserLineBusy](https://cloud.tencent.com/document/product/647/78755#onUserLineBusy)</td>
57
+
58
+ <td rowspan="1" colSpan="1" >xxxx 用户忙线的回调</td>
59
+ </tr>
60
+
61
+ <tr>
62
+ <td rowspan="1" colSpan="1" >[onUserInviting](https://cloud.tencent.com/document/product/647/78755#onUserInviting)</td>
63
+
64
+ <td rowspan="1" colSpan="1" >xxxx 用户被追加邀请加入通话时的回调</td>
65
+ </tr>
66
+
67
+ <tr>
68
+ <td rowspan="1" colSpan="1" >[onUserJoin](https://cloud.tencent.com/document/product/647/78755#onUserJoin)</td>
69
+
70
+ <td rowspan="1" colSpan="1" >xxxx 用户加入通话的回调</td>
71
+ </tr>
72
+
73
+ <tr>
74
+ <td rowspan="1" colSpan="1" >[onUserLeave](https://cloud.tencent.com/document/product/647/78755#onUserLeave)</td>
75
+
76
+ <td rowspan="1" colSpan="1" >xxxx 用户离开通话的回调</td>
77
+ </tr>
78
+
79
+ <tr>
80
+ <td rowspan="1" colSpan="1" >[onUserVideoAvailable](https://cloud.tencent.com/document/product/647/78755#onUserVideoAvailable)</td>
81
+
82
+ <td rowspan="1" colSpan="1" >xxxx 用户是否有视频流的回调</td>
83
+ </tr>
84
+
85
+ <tr>
86
+ <td rowspan="1" colSpan="1" >[onUserAudioAvailable](https://cloud.tencent.com/document/product/647/78755#onUserAudioAvailable)</td>
87
+
88
+ <td rowspan="1" colSpan="1" >xxxx 用户是否有音频流的回调</td>
89
+ </tr>
90
+
91
+ <tr>
92
+ <td rowspan="1" colSpan="1" >[onUserVoiceVolumeChanged](https://cloud.tencent.com/document/product/647/78755#onUserVoiceVolumeChanged)</td>
93
+
94
+ <td rowspan="1" colSpan="1" >所有用户音量大小的反馈回调</td>
95
+ </tr>
96
+
97
+ <tr>
98
+ <td rowspan="1" colSpan="1" >[onUserNetworkQualityChanged](https://cloud.tencent.com/document/product/647/78755#onUserNetworkQualityChanged)</td>
99
+
100
+ <td rowspan="1" colSpan="1" >所有用户网络质量的反馈回调</td>
101
+ </tr>
102
+
103
+ <tr>
104
+ <td rowspan="1" colSpan="1" >[onKickedOffline](https://cloud.tencent.com/document/product/647/78755#onKickedOffline)</td>
105
+
106
+ <td rowspan="1" colSpan="1" >当前用户被踢下线</td>
107
+ </tr>
108
+
109
+ <tr>
110
+ <td rowspan="1" colSpan="1" >[onUserSigExpired](https://cloud.tencent.com/document/product/647/78755#onUserSigExpired)</td>
111
+
112
+ <td rowspan="1" colSpan="1" >在线时票据过期</td>
113
+ </tr>
114
+ </table>
115
+
116
+
117
+ ## 回调事件详情
118
+
119
+ ### onError
120
+
121
+ 错误回调。
122
+
123
+ > **说明:**
124
+ >
125
+
126
+ > SDK 不可恢复的错误,一定要监听,并分情况给用户适当的界面提示。
127
+ >
128
+
129
+ ``` objectivec
130
+ - (void)onError:(int)code message:(NSString * _Nullable)message;
131
+ ```
132
+
133
+ 参数如下表所示:
134
+ <table>
135
+ <tr>
136
+ <td rowspan="1" colSpan="1" >参数</td>
137
+
138
+ <td rowspan="1" colSpan="1" >类型</td>
139
+
140
+ <td rowspan="1" colSpan="1" >含义</td>
141
+ </tr>
142
+
143
+ <tr>
144
+ <td rowspan="1" colSpan="1" >code</td>
145
+
146
+ <td rowspan="1" colSpan="1" >int</td>
147
+
148
+ <td rowspan="1" colSpan="1" >错误码</td>
149
+ </tr>
150
+
151
+ <tr>
152
+ <td rowspan="1" colSpan="1" >message</td>
153
+
154
+ <td rowspan="1" colSpan="1" >NSString</td>
155
+
156
+ <td rowspan="1" colSpan="1" >错误信息</td>
157
+ </tr>
158
+ </table>
159
+
160
+
161
+ ### onCallReceived
162
+
163
+ 收到一个新的来电请求回调,被叫会收到,您可以通过监听这个事件,来决定是否显示通话接听界面。
164
+ ``` objectivec
165
+ - (void)onCallReceived:(NSString *)callId callerId:(NSString *)callerId calleeIdList:(NSArray<NSString *> *)calleeIdList mediaType:(TUICallMediaType)mediaType info:(TUICallObserverExtraInfo *)info;
166
+ ```
167
+
168
+ 参数如下表所示:
169
+ <table>
170
+ <tr>
171
+ <td rowspan="1" colSpan="1" >参数</td>
172
+
173
+ <td rowspan="1" colSpan="1" >类型</td>
174
+
175
+ <td rowspan="1" colSpan="1" >含义</td>
176
+ </tr>
177
+
178
+ <tr>
179
+ <td rowspan="1" colSpan="1" >callId</td>
180
+
181
+ <td rowspan="1" colSpan="1" >NSString</td>
182
+
183
+ <td rowspan="1" colSpan="1" >此次通话的唯一 ID</td>
184
+ </tr>
185
+
186
+ <tr>
187
+ <td rowspan="1" colSpan="1" >callerId</td>
188
+
189
+ <td rowspan="1" colSpan="1" >NSString</td>
190
+
191
+ <td rowspan="1" colSpan="1" >主叫 ID(邀请方)</td>
192
+ </tr>
193
+
194
+ <tr>
195
+ <td rowspan="1" colSpan="1" >calleeIdList</td>
196
+
197
+ <td rowspan="1" colSpan="1" >NSArray</td>
198
+
199
+ <td rowspan="1" colSpan="1" >被叫 ID 列表(被邀请方)</td>
200
+ </tr>
201
+
202
+ <tr>
203
+ <td rowspan="1" colSpan="1" >mediaType</td>
204
+
205
+ <td rowspan="1" colSpan="1" >[TUICallMediaType](https://cloud.tencent.com/document/product/647/90446#MediaType)</td>
206
+
207
+ <td rowspan="1" colSpan="1" >通话的媒体类型,比如视频通话、语音通话</td>
208
+ </tr>
209
+
210
+ <tr>
211
+ <td rowspan="1" colSpan="1" >info</td>
212
+
213
+ <td rowspan="1" colSpan="1" >[TUICallObserverExtraInfo](https://cloud.tencent.com/document/product/647/90446#ObserverExtraInfo)</td>
214
+
215
+ <td rowspan="1" colSpan="1" >其他信息</td>
216
+ </tr>
217
+ </table>
218
+
219
+
220
+ ### onCallBegin
221
+
222
+ 表示通话接通,主叫和被叫都可以收到,您可以通过监听这个事件来开启云端录制、内容审核等流程。
223
+ ``` objectivec
224
+ - (void)onCallBegin:(NSString *)callId mediaType:(TUICallMediaType)mediaType info:(TUICallObserverExtraInfo *)info;
225
+ ```
226
+
227
+ 参数如下表所示:
228
+ <table>
229
+ <tr>
230
+ <td rowspan="1" colSpan="1" >参数</td>
231
+
232
+ <td rowspan="1" colSpan="1" >类型</td>
233
+
234
+ <td rowspan="1" colSpan="1" >含义</td>
235
+ </tr>
236
+
237
+ <tr>
238
+ <td rowspan="1" colSpan="1" >callId</td>
239
+
240
+ <td rowspan="1" colSpan="1" >NSString</td>
241
+
242
+ <td rowspan="1" colSpan="1" >此次通话的唯一 ID</td>
243
+ </tr>
244
+
245
+ <tr>
246
+ <td rowspan="1" colSpan="1" >mediaType</td>
247
+
248
+ <td rowspan="1" colSpan="1" >[TUICallMediaType](https://cloud.tencent.com/document/product/647/90446#MediaType)</td>
249
+
250
+ <td rowspan="1" colSpan="1" >通话的媒体类型,视频通话、语音通话</td>
251
+ </tr>
252
+
253
+ <tr>
254
+ <td rowspan="1" colSpan="1" >info</td>
255
+
256
+ <td rowspan="1" colSpan="1" >[TUICallObserverExtraInfo](https://cloud.tencent.com/document/product/647/90446#ObserverExtraInfo)</td>
257
+
258
+ <td rowspan="1" colSpan="1" >其他信息</td>
259
+ </tr>
260
+ </table>
261
+
262
+
263
+ ### onCallEnd
264
+
265
+ 表示通话挂断,主叫和被叫都可以收到,您可以通过监听这个事件来显示通话时长、通话类型等信息,或者来停止云端的录制流程。
266
+ ``` objectivec
267
+ - (void)onCallEnd:(NSString *)callId mediaType:(TUICallMediaType)mediaType reason:(TUICallEndReason)reason userId:(NSString *)userId totalTime:(float)totalTime info:(TUICallObserverExtraInfo *)info;
268
+ ```
269
+
270
+ 参数如下表所示:
271
+ <table>
272
+ <tr>
273
+ <td rowspan="1" colSpan="1" >参数</td>
274
+
275
+ <td rowspan="1" colSpan="1" >类型</td>
276
+
277
+ <td rowspan="1" colSpan="1" >含义</td>
278
+ </tr>
279
+
280
+ <tr>
281
+ <td rowspan="1" colSpan="1" >callId</td>
282
+
283
+ <td rowspan="1" colSpan="1" >NSString</td>
284
+
285
+ <td rowspan="1" colSpan="1" >此次通话的音视频房间 ID</td>
286
+ </tr>
287
+
288
+ <tr>
289
+ <td rowspan="1" colSpan="1" >mediaType</td>
290
+
291
+ <td rowspan="1" colSpan="1" >[TUICallMediaType](https://cloud.tencent.com/document/product/647/90446#MediaType)</td>
292
+
293
+ <td rowspan="1" colSpan="1" >通话的媒体类型,视频通话、语音通话</td>
294
+ </tr>
295
+
296
+ <tr>
297
+ <td rowspan="1" colSpan="1" >reason</td>
298
+
299
+ <td rowspan="1" colSpan="1" >[TUICallEndReason](https://cloud.tencent.com/document/product/647/90446#EndReason)</td>
300
+
301
+ <td rowspan="1" colSpan="1" >通话结束原因</td>
302
+ </tr>
303
+
304
+ <tr>
305
+ <td rowspan="1" colSpan="1" >userId</td>
306
+
307
+ <td rowspan="1" colSpan="1" >NSString</td>
308
+
309
+ <td rowspan="1" colSpan="1" >结束通话的用户 ID</td>
310
+ </tr>
311
+
312
+ <tr>
313
+ <td rowspan="1" colSpan="1" >totalTime</td>
314
+
315
+ <td rowspan="1" colSpan="1" >float</td>
316
+
317
+ <td rowspan="1" colSpan="1" >此次通话的时长,单位:秒</td>
318
+ </tr>
319
+
320
+ <tr>
321
+ <td rowspan="1" colSpan="1" >info</td>
322
+
323
+ <td rowspan="1" colSpan="1" >[TUICallObserverExtraInfo](https://cloud.tencent.com/document/product/647/90446#ObserverExtraInfo)</td>
324
+
325
+ <td rowspan="1" colSpan="1" >其他信息</td>
326
+ </tr>
327
+ </table>
328
+
329
+
330
+ > **注意:**
331
+ >
332
+
333
+ > 客户端的事件一般都会随着杀进程等异常事件丢失掉,如果您需要通过监听通话时长来完成计费等逻辑,建议可以使用 REST API 来完成这类流程。
334
+ >
335
+
336
+
337
+ ### onCallNotConnected
338
+
339
+ 表示此次通话主叫取消、被叫超时、拒接等,涉及多个场景,您可以通过监听这个事件来实现类似未接来电、重置 UI 状态等显示逻辑。
340
+ - 主叫取消:主叫收到该回调(userId 为自己);被叫收到该回调(userId 为**主叫的 ID)。**
341
+
342
+ - 被叫超时:主叫会同时收到 [onUserNoResponse](https://cloud.tencent.com/document/product/647/78755#onUserNoResponse) 和 onCallNotConnected 回调(userId 是自己的 ID);被叫收到 onCallNotConnected 回调(userId 是自己的 ID)。
343
+
344
+ - 被叫拒接:主叫会同时收到 [onUserReject](https://cloud.tencent.com/document/product/647/78755#onUserReject) 和 onCallNotConnected 回调(userId 是自己的 ID);被叫收到 onCallNotConnected 回调(userId 是自己的 ID)。
345
+
346
+ - 被叫忙线:主叫会同时收到 [onUserLineBusy](https://cloud.tencent.com/document/product/647/78755#onUserLineBusy) 和 onCallNotConnected 回调(userId 是自己的 ID)。
347
+
348
+ - 异常中断:被叫接收通话失败,收到该回调(userId 是自己的 ID)。
349
+
350
+ ``` objectivec
351
+ - (void)onCallNotConnected:(NSString *)callId mediaType:(TUICallMediaType)mediaType reason:(TUICallEndReason)reaso userId:(NSString *)userId info:(TUICallObserverExtraInfo *)info
352
+ ```
353
+
354
+ 参数如下表所示:
355
+
356
+ <table>
357
+ <tr>
358
+ <td rowspan="1" colSpan="1" >参数</td>
359
+
360
+ <td rowspan="1" colSpan="1" >类型</td>
361
+
362
+ <td rowspan="1" colSpan="1" >含义</td>
363
+ </tr>
364
+
365
+ <tr>
366
+ <td rowspan="1" colSpan="1" >callId</td>
367
+
368
+ <td rowspan="1" colSpan="1" >NSString</td>
369
+
370
+ <td rowspan="1" colSpan="1" >此次通话的音视频房间 ID</td>
371
+ </tr>
372
+
373
+ <tr>
374
+ <td rowspan="1" colSpan="1" >mediaType</td>
375
+
376
+ <td rowspan="1" colSpan="1" >[TUICallMediaType](https://cloud.tencent.com/document/product/647/90446#MediaType)</td>
377
+
378
+ <td rowspan="1" colSpan="1" >通话的媒体类型,视频通话、语音通话</td>
379
+ </tr>
380
+
381
+ <tr>
382
+ <td rowspan="1" colSpan="1" >reason</td>
383
+
384
+ <td rowspan="1" colSpan="1" >[TUICallEndReason](https://cloud.tencent.com/document/product/647/90446#EndReason)</td>
385
+
386
+ <td rowspan="1" colSpan="1" >通话未连接原因</td>
387
+ </tr>
388
+
389
+ <tr>
390
+ <td rowspan="1" colSpan="1" >userId</td>
391
+
392
+ <td rowspan="1" colSpan="1" >NSString</td>
393
+
394
+ <td rowspan="1" colSpan="1" >导致通话未连接的用户 ID</td>
395
+ </tr>
396
+
397
+ <tr>
398
+ <td rowspan="1" colSpan="1" >info</td>
399
+
400
+ <td rowspan="1" colSpan="1" >[TUICallObserverExtraInfo](https://cloud.tencent.com/document/product/647/90446#ObserverExtraInfo)</td>
401
+
402
+ <td rowspan="1" colSpan="1" >其他信息</td>
403
+ </tr>
404
+ </table>
405
+
406
+
407
+ ### onUserReject
408
+
409
+ 通话被拒绝的回调,在1v1 通话中,只有主叫方会收到拒绝回调,在群组通话中,所有被邀请者都可以收到该回调。
410
+ ``` objectivec
411
+ - (void)onUserReject:(NSString *)userId;
412
+ ```
413
+
414
+ 参数如下表所示:
415
+ <table>
416
+ <tr>
417
+ <td rowspan="1" colSpan="1" >参数</td>
418
+
419
+ <td rowspan="1" colSpan="1" >类型</td>
420
+
421
+ <td rowspan="1" colSpan="1" >含义</td>
422
+ </tr>
423
+
424
+ <tr>
425
+ <td rowspan="1" colSpan="1" >userId</td>
426
+
427
+ <td rowspan="1" colSpan="1" >NSString</td>
428
+
429
+ <td rowspan="1" colSpan="1" >拒绝用户的 ID</td>
430
+ </tr>
431
+ </table>
432
+
433
+
434
+ ### onUserNoResponse
435
+
436
+ 对方无回应的回调。
437
+ ``` objectivec
438
+ - (void)onUserNoResponse:(NSString *)userId;
439
+ ```
440
+
441
+ 参数如下表所示:
442
+ <table>
443
+ <tr>
444
+ <td rowspan="1" colSpan="1" >参数</td>
445
+
446
+ <td rowspan="1" colSpan="1" >类型</td>
447
+
448
+ <td rowspan="1" colSpan="1" >含义</td>
449
+ </tr>
450
+
451
+ <tr>
452
+ <td rowspan="1" colSpan="1" >userId</td>
453
+
454
+ <td rowspan="1" colSpan="1" >NSString</td>
455
+
456
+ <td rowspan="1" colSpan="1" >无响应用户的 ID</td>
457
+ </tr>
458
+ </table>
459
+
460
+
461
+ ### onUserLineBusy
462
+
463
+ 通话忙线回调。
464
+ ``` objectivec
465
+ - (void)onUserLineBusy:(NSString *)userId;
466
+ ```
467
+
468
+ 参数如下表所示:
469
+ <table>
470
+ <tr>
471
+ <td rowspan="1" colSpan="1" >参数</td>
472
+
473
+ <td rowspan="1" colSpan="1" >类型</td>
474
+
475
+ <td rowspan="1" colSpan="1" >含义</td>
476
+ </tr>
477
+
478
+ <tr>
479
+ <td rowspan="1" colSpan="1" >userId</td>
480
+
481
+ <td rowspan="1" colSpan="1" >NSString</td>
482
+
483
+ <td rowspan="1" colSpan="1" >忙线用户的 ID</td>
484
+ </tr>
485
+ </table>
486
+
487
+
488
+ ### onUserInviting
489
+
490
+ 用户被追加邀请加入通话时的回调。
491
+ ``` objectivec
492
+ - (void)onUserInviting:(NSString *)userId;
493
+ ```
494
+
495
+ 参数如下表所示:
496
+ <table>
497
+ <tr>
498
+ <td rowspan="1" colSpan="1" >参数</td>
499
+
500
+ <td rowspan="1" colSpan="1" >类型</td>
501
+
502
+ <td rowspan="1" colSpan="1" >含义</td>
503
+ </tr>
504
+
505
+ <tr>
506
+ <td rowspan="1" colSpan="1" >userId</td>
507
+
508
+ <td rowspan="1" colSpan="1" >NSString</td>
509
+
510
+ <td rowspan="1" colSpan="1" >被追加邀请用户的 ID</td>
511
+ </tr>
512
+ </table>
513
+
514
+
515
+ ### onUserJoin
516
+
517
+ 有用户进入此次通话的回调。
518
+ ``` objectivec
519
+ - (void)onUserJoin:(NSString *)userId;
520
+ ```
521
+
522
+ 参数如下表所示:
523
+ <table>
524
+ <tr>
525
+ <td rowspan="1" colSpan="1" >参数</td>
526
+
527
+ <td rowspan="1" colSpan="1" >类型</td>
528
+
529
+ <td rowspan="1" colSpan="1" >含义</td>
530
+ </tr>
531
+
532
+ <tr>
533
+ <td rowspan="1" colSpan="1" >userId</td>
534
+
535
+ <td rowspan="1" colSpan="1" >NSString</td>
536
+
537
+ <td rowspan="1" colSpan="1" >加入当前通话的用户 ID</td>
538
+ </tr>
539
+ </table>
540
+
541
+
542
+ ### onUserLeave
543
+
544
+ 有用户离开此次通话的回调。
545
+ ``` objectivec
546
+ - (void)onUserLeave:(NSString *)userId;
547
+ ```
548
+
549
+ 参数如下表所示:
550
+ <table>
551
+ <tr>
552
+ <td rowspan="1" colSpan="1" >参数</td>
553
+
554
+ <td rowspan="1" colSpan="1" >类型</td>
555
+
556
+ <td rowspan="1" colSpan="1" >含义</td>
557
+ </tr>
558
+
559
+ <tr>
560
+ <td rowspan="1" colSpan="1" >userId</td>
561
+
562
+ <td rowspan="1" colSpan="1" >NSString</td>
563
+
564
+ <td rowspan="1" colSpan="1" >离开当前通话的用户 ID</td>
565
+ </tr>
566
+ </table>
567
+
568
+
569
+ ### onUserVideoAvailable
570
+
571
+ 用户是否开启视频上行回调。
572
+ ``` objectivec
573
+ - (void)onUserVideoAvailable:(NSString *)userId isVideoAvailable:(BOOL)isVideoAvailable;
574
+ ```
575
+
576
+ 参数如下表所示:
577
+ <table>
578
+ <tr>
579
+ <td rowspan="1" colSpan="1" >参数</td>
580
+
581
+ <td rowspan="1" colSpan="1" >类型</td>
582
+
583
+ <td rowspan="1" colSpan="1" >含义</td>
584
+ </tr>
585
+
586
+ <tr>
587
+ <td rowspan="1" colSpan="1" >userId</td>
588
+
589
+ <td rowspan="1" colSpan="1" >NSString</td>
590
+
591
+ <td rowspan="1" colSpan="1" >通话用户 ID</td>
592
+ </tr>
593
+
594
+ <tr>
595
+ <td rowspan="1" colSpan="1" >isVideoAvailable</td>
596
+
597
+ <td rowspan="1" colSpan="1" >BOOL</td>
598
+
599
+ <td rowspan="1" colSpan="1" >用户视频是否可用</td>
600
+ </tr>
601
+ </table>
602
+
603
+
604
+ ### onUserAudioAvailable
605
+
606
+ 用户是否开启音频上行回调。
607
+ ``` objectivec
608
+ - (void)onUserAudioAvailable:(NSString *)userId isAudioAvailable:(BOOL)isAudioAvailable;
609
+ ```
610
+
611
+ 参数如下表所示:
612
+ <table>
613
+ <tr>
614
+ <td rowspan="1" colSpan="1" >参数</td>
615
+
616
+ <td rowspan="1" colSpan="1" >类型</td>
617
+
618
+ <td rowspan="1" colSpan="1" >含义</td>
619
+ </tr>
620
+
621
+ <tr>
622
+ <td rowspan="1" colSpan="1" >userId</td>
623
+
624
+ <td rowspan="1" colSpan="1" >NSString</td>
625
+
626
+ <td rowspan="1" colSpan="1" >通话用户 ID</td>
627
+ </tr>
628
+
629
+ <tr>
630
+ <td rowspan="1" colSpan="1" >isAudioAvailable</td>
631
+
632
+ <td rowspan="1" colSpan="1" >BOOL</td>
633
+
634
+ <td rowspan="1" colSpan="1" >用户音频是否可用</td>
635
+ </tr>
636
+ </table>
637
+
638
+
639
+ ### onUserVoiceVolumeChanged
640
+
641
+ 用户通话音量的回调。
642
+ ``` objectivec
643
+ - (void)onUserVoiceVolumeChanged:(NSDictionary <NSString *, NSNumber *> *)volumeMap;
644
+ ```
645
+
646
+ 参数如下表所示:
647
+ <table>
648
+ <tr>
649
+ <td rowspan="1" colSpan="1" >参数</td>
650
+
651
+ <td rowspan="1" colSpan="1" >类型</td>
652
+
653
+ <td rowspan="1" colSpan="1" >含义</td>
654
+ </tr>
655
+
656
+ <tr>
657
+ <td rowspan="1" colSpan="1" >volumeMap</td>
658
+
659
+ <td rowspan="1" colSpan="1" >NSDictionary</td>
660
+
661
+ <td rowspan="1" colSpan="1" >音量表,根据每个 userId 可以获取对应的音量大小,音量最小值为0,音量最大值为100</td>
662
+ </tr>
663
+ </table>
664
+
665
+
666
+ ### onUserNetworkQualityChanged
667
+
668
+ 用户网络质量的回调。
669
+ ``` objectivec
670
+ - (void)onUserNetworkQualityChanged:(NSArray<TUINetworkQualityInfo *> *)networkQualityList;
671
+ ```
672
+
673
+ 参数如下表所示:
674
+ <table>
675
+ <tr>
676
+ <td rowspan="1" colSpan="1" >参数</td>
677
+
678
+ <td rowspan="1" colSpan="1" >类型</td>
679
+
680
+ <td rowspan="1" colSpan="1" >含义</td>
681
+ </tr>
682
+
683
+ <tr>
684
+ <td rowspan="1" colSpan="1" >networkQualityList</td>
685
+
686
+ <td rowspan="1" colSpan="1" >NSArray</td>
687
+
688
+ <td rowspan="1" colSpan="1" >网络状态,根据每个 userId 可以获取对应用户当前的网络质量</td>
689
+ </tr>
690
+ </table>
691
+
692
+
693
+ ### onKickedOffline
694
+
695
+ 当前用户被踢下线:此时可以 UI 提示用户,并重新调用初始化。
696
+ ``` objectivec
697
+ - (void)onKickedOffline;
698
+ ```
699
+
700
+ ### onUserSigExpired
701
+
702
+ 在线时票据过期:此时您需要生成新的 userSig,并重新调用初始化。
703
+ ``` objectivec
704
+ - (void)onUserSigExpired;
705
+ ```
706
+
707
+ ## 废弃回调
708
+
709
+ ### onCallCancelled
710
+
711
+ 表示此次通话主叫取消、被叫超时、拒接等,涉及多个场景,您可以通过监听这个事件来实现类似未接来电、重置 UI 状态等显示逻辑。
712
+ - 主叫取消:主叫收到该回调(userId 为自己);被叫收到该回调(userId 为**主叫的 ID)。**
713
+
714
+ - 被叫超时:主叫会同时收到 [onUserNoResponse](https://cloud.tencent.com/document/product/647/78755#onUserNoResponse) 和 onCallCancelled 回调(userId 是自己的 ID);被叫收到 onCallCancelled 回调(userId 是自己的 ID)。
715
+
716
+ - 被叫拒接:主叫会同时收到 [onUserReject](https://cloud.tencent.com/document/product/647/78755#onUserReject) 和 onCallCancelled 回调(userId 是自己的 ID);被叫收到 onCallCancelled 回调(userId 是自己的 ID)。
717
+
718
+ - 被叫忙线:主叫会同时收到 [onUserLineBusy](https://cloud.tencent.com/document/product/647/78755#onUserLineBusy) 和 onCallCancelled 回调(userId 是自己的 ID)。
719
+
720
+ - 异常中断:被叫接收通话失败,收到该回调(userId 是自己的 ID)。
721
+
722
+ ``` objectivec
723
+ - (void)onCallCancelled:(NSString *)userId;
724
+ ```
725
+
726
+ 参数如下表所示:
727
+
728
+ <table>
729
+ <tr>
730
+ <td rowspan="1" colSpan="1" >参数</td>
731
+
732
+ <td rowspan="1" colSpan="1" >类型</td>
733
+
734
+ <td rowspan="1" colSpan="1" >含义</td>
735
+ </tr>
736
+
737
+ <tr>
738
+ <td rowspan="1" colSpan="1" >userId</td>
739
+
740
+ <td rowspan="1" colSpan="1" >NSString</td>
741
+
742
+ <td rowspan="1" colSpan="1" >用户的 ID</td>
743
+ </tr>
744
+ </table>
745
+
746
+
747
+ ### onCallMediaTypeChanged
748
+
749
+ 表示通话的媒体类型发生变化。
750
+ ``` objectivec
751
+ - (void)onCallMediaTypeChanged:(TUICallMediaType)oldCallMediaType newCallMediaType:(TUICallMediaType)newCallMediaType;
752
+ ```
753
+
754
+ 参数如下表所示:
755
+ <table>
756
+ <tr>
757
+ <td rowspan="1" colSpan="1" >参数</td>
758
+
759
+ <td rowspan="1" colSpan="1" >类型</td>
760
+
761
+ <td rowspan="1" colSpan="1" >含义</td>
762
+ </tr>
763
+
764
+ <tr>
765
+ <td rowspan="1" colSpan="1" >oldCallMediaType</td>
766
+
767
+ <td rowspan="1" colSpan="1" >[TUICallMediaType](https://cloud.tencent.com/document/product/647/90446#MediaType)</td>
768
+
769
+ <td rowspan="1" colSpan="1" >旧的通话类型</td>
770
+ </tr>
771
+
772
+ <tr>
773
+ <td rowspan="1" colSpan="1" >newCallMediaType</td>
774
+
775
+ <td rowspan="1" colSpan="1" >[TUICallMediaType](https://cloud.tencent.com/document/product/647/90446#MediaType)</td>
776
+
777
+ <td rowspan="1" colSpan="1" >新的通话类型</td>
778
+ </tr>
779
+ </table>