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