@tencentcloud/sdk-mcp 1.0.2 → 1.0.4
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/@tencent/aegis-node-sdk/lib/packages/core/src/constant/config.d.ts +14 -14
- package/@tencent/aegis-node-sdk/lib/packages/core/src/constant/global.d.ts +1 -1
- package/@tencent/aegis-node-sdk/lib/packages/core/src/constant/index.d.ts +9 -9
- package/@tencent/aegis-node-sdk/lib/packages/core/src/constant/report-ignore.d.ts +2 -2
- package/@tencent/aegis-node-sdk/lib/packages/core/src/core.d.ts +85 -85
- package/@tencent/aegis-node-sdk/lib/packages/core/src/hooks/afterRequestHooks.d.ts +3 -3
- package/@tencent/aegis-node-sdk/lib/packages/core/src/hooks/beforeRequestHooks.d.ts +9 -9
- package/@tencent/aegis-node-sdk/lib/packages/core/src/hooks/modifyRequestHooks.d.ts +3 -3
- package/@tencent/aegis-node-sdk/lib/packages/core/src/index.d.ts +9 -9
- package/@tencent/aegis-node-sdk/lib/packages/core/src/interface/config.d.ts +62 -62
- package/@tencent/aegis-node-sdk/lib/packages/core/src/interface/env.d.ts +11 -11
- package/@tencent/aegis-node-sdk/lib/packages/core/src/interface/index.d.ts +4 -4
- package/@tencent/aegis-node-sdk/lib/packages/core/src/interface/log.d.ts +130 -130
- package/@tencent/aegis-node-sdk/lib/packages/core/src/interface/send.d.ts +34 -34
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/format.d.ts +2 -2
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/index.d.ts +18 -18
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/length-limit.d.ts +8 -8
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/pv.d.ts +8 -8
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/remove-payload.d.ts +2 -2
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/repeat-limit.d.ts +4 -4
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/report.d.ts +10 -10
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/sample.d.ts +3 -3
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/throttle.d.ts +3 -3
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/trace/index.d.ts +34 -34
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/trace/jwt.d.ts +12 -12
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/trace/ot-js.d.ts +14 -14
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/trace/uuid.d.ts +2 -2
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/whitelist.d.ts +12 -12
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/write-before.d.ts +3 -3
- package/@tencent/aegis-node-sdk/lib/packages/core/src/plugin.d.ts +33 -33
- package/@tencent/aegis-node-sdk/lib/packages/core/src/util/destroy.d.ts +2 -2
- package/@tencent/aegis-node-sdk/lib/packages/core/src/util/event-emitter.d.ts +18 -18
- package/@tencent/aegis-node-sdk/lib/packages/core/src/util/index.d.ts +60 -60
- package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/index.d.ts +15 -15
- package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/interface/selector.d.ts +5 -5
- package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/pipes/batch-report-pipe.d.ts +6 -6
- package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/protocol/protocol_base.d.ts +18 -18
- package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/protocol/protocol_http.d.ts +12 -12
- package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/selector/ip_selector.d.ts +10 -10
- package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/selector/polaris_selector.d.ts +20 -20
- package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/selector/selector_base.d.ts +27 -27
- package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/util/eval_require.d.ts +2 -2
- package/mcp-server-prompt.png +0 -0
- package/mcp.json +9 -9
- package/package.json +1 -1
- package/resource/doc/chatuikit/android/client_api_android.md +1377 -0
- package/resource/doc/chatuikit/android/integrate_tuichat_only_android.md +382 -0
- package/resource/doc/chatuikit/android/integrate_tuikit_android.md +612 -0
- package/resource/doc/chatuikit/android/ui_api_android.md +418 -0
- package/resource/doc/chatuikit/faq/freq_qa.md +86 -0
- package/resource/doc/chatuikit/faq/sdk_qa.md +117 -0
- package/resource/doc/chatuikit/faq/vue_qa.md +344 -0
- package/resource/doc/chatuikit/faq/web_qa.md +118 -0
- package/resource/doc/chatuikit/flutter/client_api_Flutter.md +939 -0
- package/resource/doc/chatuikit/flutter/integrate_tuikit_Flutter.md +1432 -0
- package/resource/doc/chatuikit/iOS/client_api_iOS.md +1371 -0
- package/resource/doc/chatuikit/iOS/integrate_tuichat_only_iOS.md +993 -0
- package/resource/doc/chatuikit/iOS/integrate_tuikit_iOS.md +1427 -0
- package/resource/doc/chatuikit/iOS/ui_api_iOS.md +526 -0
- package/resource/doc/chatuikit/react/integrate_tuichat_only_react.md +185 -0
- package/resource/doc/chatuikit/react/integrate_tuichat_react.md +212 -0
- package/resource/doc/chatuikit/vue/integrate_tuichat_only_vue.md +149 -0
- package/resource/doc/chatuikit/vue/integrate_tuichat_vue.md +248 -0
- package/server.js +57 -33
- package/server.js.map +1 -1
- package/@tencent/polaris/node_modules/axios/CHANGELOG.md +0 -891
- package/@tencent/polaris/node_modules/axios/LICENSE +0 -19
- package/@tencent/polaris/node_modules/axios/README.md +0 -908
- package/@tencent/polaris/node_modules/axios/SECURITY.md +0 -5
- package/@tencent/polaris/node_modules/axios/UPGRADE_GUIDE.md +0 -168
- package/@tencent/polaris/node_modules/axios/dist/axios.js +0 -2277
- package/@tencent/polaris/node_modules/axios/dist/axios.map +0 -1
- package/@tencent/polaris/node_modules/axios/dist/axios.min.js +0 -4
- package/@tencent/polaris/node_modules/axios/dist/axios.min.map +0 -1
- package/@tencent/polaris/node_modules/axios/index.d.ts +0 -221
- package/@tencent/polaris/node_modules/axios/index.js +0 -1
- package/@tencent/polaris/node_modules/axios/lib/adapters/README.md +0 -37
- package/@tencent/polaris/node_modules/axios/lib/adapters/http.js +0 -388
- package/@tencent/polaris/node_modules/axios/lib/adapters/xhr.js +0 -212
- package/@tencent/polaris/node_modules/axios/lib/axios.js +0 -57
- package/@tencent/polaris/node_modules/axios/lib/cancel/Cancel.js +0 -19
- package/@tencent/polaris/node_modules/axios/lib/cancel/CancelToken.js +0 -119
- package/@tencent/polaris/node_modules/axios/lib/cancel/isCancel.js +0 -5
- package/@tencent/polaris/node_modules/axios/lib/core/Axios.js +0 -155
- package/@tencent/polaris/node_modules/axios/lib/core/InterceptorManager.js +0 -54
- package/@tencent/polaris/node_modules/axios/lib/core/README.md +0 -8
- package/@tencent/polaris/node_modules/axios/lib/core/buildFullPath.js +0 -20
- package/@tencent/polaris/node_modules/axios/lib/core/createError.js +0 -18
- package/@tencent/polaris/node_modules/axios/lib/core/dispatchRequest.js +0 -87
- package/@tencent/polaris/node_modules/axios/lib/core/enhanceError.js +0 -43
- package/@tencent/polaris/node_modules/axios/lib/core/mergeConfig.js +0 -99
- package/@tencent/polaris/node_modules/axios/lib/core/settle.js +0 -25
- package/@tencent/polaris/node_modules/axios/lib/core/transformData.js +0 -22
- package/@tencent/polaris/node_modules/axios/lib/defaults.js +0 -134
- package/@tencent/polaris/node_modules/axios/lib/env/README.md +0 -3
- package/@tencent/polaris/node_modules/axios/lib/env/data.js +0 -3
- package/@tencent/polaris/node_modules/axios/lib/helpers/README.md +0 -7
- package/@tencent/polaris/node_modules/axios/lib/helpers/bind.js +0 -11
- package/@tencent/polaris/node_modules/axios/lib/helpers/buildURL.js +0 -70
- package/@tencent/polaris/node_modules/axios/lib/helpers/combineURLs.js +0 -14
- package/@tencent/polaris/node_modules/axios/lib/helpers/cookies.js +0 -53
- package/@tencent/polaris/node_modules/axios/lib/helpers/deprecatedMethod.js +0 -24
- package/@tencent/polaris/node_modules/axios/lib/helpers/isAbsoluteURL.js +0 -14
- package/@tencent/polaris/node_modules/axios/lib/helpers/isAxiosError.js +0 -13
- package/@tencent/polaris/node_modules/axios/lib/helpers/isURLSameOrigin.js +0 -68
- package/@tencent/polaris/node_modules/axios/lib/helpers/normalizeHeaderName.js +0 -12
- package/@tencent/polaris/node_modules/axios/lib/helpers/parseHeaders.js +0 -53
- package/@tencent/polaris/node_modules/axios/lib/helpers/spread.js +0 -27
- package/@tencent/polaris/node_modules/axios/lib/helpers/toFormData.js +0 -55
- package/@tencent/polaris/node_modules/axios/lib/helpers/validator.js +0 -82
- package/@tencent/polaris/node_modules/axios/lib/utils.js +0 -349
- package/@tencent/polaris/node_modules/axios/package.json +0 -86
- package/@tencent/polaris/node_modules/axios/tsconfig.json +0 -14
- package/@tencent/polaris/node_modules/axios/tslint.json +0 -6
- package/resource/doc/tuicallkit/vue/api_TUICallObserver.md +0 -926
|
@@ -1,926 +0,0 @@
|
|
|
1
|
-
## TUICallObserver API 简介
|
|
2
|
-
|
|
3
|
-
TUICallObserver 是 TUICallKit 对应的回调事件类,您可以通过此回调,来监听自己感兴趣的回调事件。
|
|
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://write.woa.com/document/94733532341563392)</td>
|
|
15
|
-
|
|
16
|
-
<td rowspan="1" colSpan="1" >通话过程中错误回调</td>
|
|
17
|
-
</tr>
|
|
18
|
-
|
|
19
|
-
<tr>
|
|
20
|
-
<td rowspan="1" colSpan="1" >[onUserInviting](https://write.woa.com/document/94733532341563392)</td>
|
|
21
|
-
|
|
22
|
-
<td rowspan="1" colSpan="1" >当用户被邀请加入通话时的回调</td>
|
|
23
|
-
</tr>
|
|
24
|
-
|
|
25
|
-
<tr>
|
|
26
|
-
<td rowspan="1" colSpan="1" >[onCallReceived](https://write.woa.com/document/94733532341563392)</td>
|
|
27
|
-
|
|
28
|
-
<td rowspan="1" colSpan="1" >通话请求的回调</td>
|
|
29
|
-
</tr>
|
|
30
|
-
|
|
31
|
-
<tr>
|
|
32
|
-
<td rowspan="1" colSpan="1" >[onCallNotConnected](https://write.woa.com/document/94733532341563392)</td>
|
|
33
|
-
|
|
34
|
-
<td rowspan="1" colSpan="1" >当前设备未接通通话。</td>
|
|
35
|
-
</tr>
|
|
36
|
-
|
|
37
|
-
<tr>
|
|
38
|
-
<td rowspan="1" colSpan="1" >[onCallBegin](https://write.woa.com/document/94733532341563392)</td>
|
|
39
|
-
|
|
40
|
-
<td rowspan="1" colSpan="1" >通话接通的回调</td>
|
|
41
|
-
</tr>
|
|
42
|
-
|
|
43
|
-
<tr>
|
|
44
|
-
<td rowspan="1" colSpan="1" >[onCallEnd](https://write.woa.com/document/94733532341563392)</td>
|
|
45
|
-
|
|
46
|
-
<td rowspan="1" colSpan="1" >通话结束的回调</td>
|
|
47
|
-
</tr>
|
|
48
|
-
|
|
49
|
-
<tr>
|
|
50
|
-
<td rowspan="1" colSpan="1" >[onUserReject](https://write.woa.com/document/94733532341563392)</td>
|
|
51
|
-
|
|
52
|
-
<td rowspan="1" colSpan="1" >xxxx 用户拒绝通话的回调</td>
|
|
53
|
-
</tr>
|
|
54
|
-
|
|
55
|
-
<tr>
|
|
56
|
-
<td rowspan="1" colSpan="1" >[onUserNoResponse](https://write.woa.com/document/94733532341563392)</td>
|
|
57
|
-
|
|
58
|
-
<td rowspan="1" colSpan="1" >xxxx 用户不响应的回调</td>
|
|
59
|
-
</tr>
|
|
60
|
-
|
|
61
|
-
<tr>
|
|
62
|
-
<td rowspan="1" colSpan="1" >[onUserLineBusy](https://write.woa.com/document/94733532341563392)</td>
|
|
63
|
-
|
|
64
|
-
<td rowspan="1" colSpan="1" >xxxx 用户忙线的回调</td>
|
|
65
|
-
</tr>
|
|
66
|
-
|
|
67
|
-
<tr>
|
|
68
|
-
<td rowspan="1" colSpan="1" >[onUserJoin](https://write.woa.com/document/94733532341563392)</td>
|
|
69
|
-
|
|
70
|
-
<td rowspan="1" colSpan="1" >xxxx 用户加入通话的回调</td>
|
|
71
|
-
</tr>
|
|
72
|
-
|
|
73
|
-
<tr>
|
|
74
|
-
<td rowspan="1" colSpan="1" >[onUserLeave](https://write.woa.com/document/94733532341563392)</td>
|
|
75
|
-
|
|
76
|
-
<td rowspan="1" colSpan="1" >xxxx 用户离开通话的回调</td>
|
|
77
|
-
</tr>
|
|
78
|
-
|
|
79
|
-
<tr>
|
|
80
|
-
<td rowspan="1" colSpan="1" >[onUserVideoAvailable](https://write.woa.com/document/94733532341563392)</td>
|
|
81
|
-
|
|
82
|
-
<td rowspan="1" colSpan="1" >xxxx 用户是否有视频流的回调</td>
|
|
83
|
-
</tr>
|
|
84
|
-
|
|
85
|
-
<tr>
|
|
86
|
-
<td rowspan="1" colSpan="1" >[onUserAudioAvailable](https://write.woa.com/document/94733532341563392)</td>
|
|
87
|
-
|
|
88
|
-
<td rowspan="1" colSpan="1" >xxxx 用户是否有音频流的回调</td>
|
|
89
|
-
</tr>
|
|
90
|
-
|
|
91
|
-
<tr>
|
|
92
|
-
<td rowspan="1" colSpan="1" >[onUserVoiceVolumeChanged](https://write.woa.com/document/94733532341563392)</td>
|
|
93
|
-
|
|
94
|
-
<td rowspan="1" colSpan="1" >所有用户音量大小的反馈回调</td>
|
|
95
|
-
</tr>
|
|
96
|
-
|
|
97
|
-
<tr>
|
|
98
|
-
<td rowspan="1" colSpan="1" >[onUserNetworkQualityChanged](https://write.woa.com/document/94733532341563392)</td>
|
|
99
|
-
|
|
100
|
-
<td rowspan="1" colSpan="1" >所有用户网络质量的反馈回调</td>
|
|
101
|
-
</tr>
|
|
102
|
-
|
|
103
|
-
<tr>
|
|
104
|
-
<td rowspan="1" colSpan="1" >[onKickedOffline](https://write.woa.com/document/94733532341563392)</td>
|
|
105
|
-
|
|
106
|
-
<td rowspan="1" colSpan="1" >当前用户被移下线</td>
|
|
107
|
-
</tr>
|
|
108
|
-
|
|
109
|
-
<tr>
|
|
110
|
-
<td rowspan="1" colSpan="1" >[onUserSigExpired](https://write.woa.com/document/94733532341563392)</td>
|
|
111
|
-
|
|
112
|
-
<td rowspan="1" colSpan="1" >在线时票据过期</td>
|
|
113
|
-
</tr>
|
|
114
|
-
</table>
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
## 回调事件详情
|
|
118
|
-
|
|
119
|
-
通过 addObserver 监听Flutter插件抛出的事件。
|
|
120
|
-
``` java
|
|
121
|
-
TUICallEngine.instance.addObserver(TUICallObserver(
|
|
122
|
-
onError: (int code, String message) {
|
|
123
|
-
|
|
124
|
-
},
|
|
125
|
-
onUserInviting: (String userId) {
|
|
126
|
-
|
|
127
|
-
},
|
|
128
|
-
onCallReceived: (String callId, String callerId, List<String> calleeIdList,
|
|
129
|
-
TUICallMediaType mediaType, CallObserverExtraInfo info) {
|
|
130
|
-
|
|
131
|
-
},
|
|
132
|
-
onCallNotConnected: (String callId, TUICallMediaType mediaType, CallEndReason reason,
|
|
133
|
-
String userId, CallObserverExtraInfo info) {
|
|
134
|
-
|
|
135
|
-
},
|
|
136
|
-
onCallBegin: (String callId, TUICallMediaType mediaType, CallObserverExtraInfo info) {
|
|
137
|
-
|
|
138
|
-
},
|
|
139
|
-
onCallEnd: (String callId, TUICallMediaType mediaType, CallEndReason reason,
|
|
140
|
-
String userId, double totalTime, CallObserverExtraInfo info) {
|
|
141
|
-
|
|
142
|
-
},
|
|
143
|
-
onCallMediaTypeChanged: (TUICallMediaType oldCallMediaType, TUICallMediaType newCallMediaType) {
|
|
144
|
-
|
|
145
|
-
},
|
|
146
|
-
onUserReject: (String userId) {
|
|
147
|
-
|
|
148
|
-
},
|
|
149
|
-
onUserNoResponse: (String userId) {
|
|
150
|
-
|
|
151
|
-
},
|
|
152
|
-
onUserLineBusy: (String onUserLineBusy) {
|
|
153
|
-
|
|
154
|
-
},
|
|
155
|
-
onUserJoin: (String userId) {
|
|
156
|
-
|
|
157
|
-
},
|
|
158
|
-
onUserLeave: (String userId) {
|
|
159
|
-
|
|
160
|
-
},
|
|
161
|
-
onUserVideoAvailable: (String userId, bool isVideoAvailable) {
|
|
162
|
-
|
|
163
|
-
},
|
|
164
|
-
onUserAudioAvailable: (String userId, bool isAudioAvailable) {
|
|
165
|
-
|
|
166
|
-
},
|
|
167
|
-
onUserNetworkQualityChanged: (List<TUINetworkQualityInfo> networkQualityList) {
|
|
168
|
-
|
|
169
|
-
},
|
|
170
|
-
onUserVoiceVolumeChanged: (Map<String, int> volumeMap) {
|
|
171
|
-
|
|
172
|
-
},
|
|
173
|
-
onKickedOffline: () {
|
|
174
|
-
|
|
175
|
-
},
|
|
176
|
-
onUserSigExpired: () {
|
|
177
|
-
|
|
178
|
-
}
|
|
179
|
-
));
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
### onError
|
|
183
|
-
|
|
184
|
-
错误事件回调。
|
|
185
|
-
|
|
186
|
-
> **说明**
|
|
187
|
-
>
|
|
188
|
-
|
|
189
|
-
> SDK 不可恢复的错误,一定要监听,并分情况给用户适当的界面提示。
|
|
190
|
-
>
|
|
191
|
-
|
|
192
|
-
``` java
|
|
193
|
-
TUICallEngine.instance.addObserver(TUICallObserver(
|
|
194
|
-
onError: (int code, String message) {
|
|
195
|
-
// TODO
|
|
196
|
-
}
|
|
197
|
-
));
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
参数如下表所示:
|
|
201
|
-
<table>
|
|
202
|
-
<tr>
|
|
203
|
-
<td rowspan="1" colSpan="1" >参数</td>
|
|
204
|
-
|
|
205
|
-
<td rowspan="1" colSpan="1" >类型</td>
|
|
206
|
-
|
|
207
|
-
<td rowspan="1" colSpan="1" >含义</td>
|
|
208
|
-
</tr>
|
|
209
|
-
|
|
210
|
-
<tr>
|
|
211
|
-
<td rowspan="1" colSpan="1" >code</td>
|
|
212
|
-
|
|
213
|
-
<td rowspan="1" colSpan="1" >int</td>
|
|
214
|
-
|
|
215
|
-
<td rowspan="1" colSpan="1" >错误码</td>
|
|
216
|
-
</tr>
|
|
217
|
-
|
|
218
|
-
<tr>
|
|
219
|
-
<td rowspan="1" colSpan="1" >message</td>
|
|
220
|
-
|
|
221
|
-
<td rowspan="1" colSpan="1" >String</td>
|
|
222
|
-
|
|
223
|
-
<td rowspan="1" colSpan="1" >错误信息</td>
|
|
224
|
-
</tr>
|
|
225
|
-
</table>
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
### onUserInviting
|
|
229
|
-
|
|
230
|
-
当用户被邀请加入通话时的回调
|
|
231
|
-
``` java
|
|
232
|
-
TUICallEngine.instance.addObserver(TUICallObserver(
|
|
233
|
-
onUserInviting: (String userId) {
|
|
234
|
-
// TODO
|
|
235
|
-
}
|
|
236
|
-
));
|
|
237
|
-
```
|
|
238
|
-
|
|
239
|
-
参数如下表所示:
|
|
240
|
-
<table>
|
|
241
|
-
<tr>
|
|
242
|
-
<td rowspan="1" colSpan="1" >参数</td>
|
|
243
|
-
|
|
244
|
-
<td rowspan="1" colSpan="1" >类型</td>
|
|
245
|
-
|
|
246
|
-
<td rowspan="1" colSpan="1" >含义</td>
|
|
247
|
-
</tr>
|
|
248
|
-
|
|
249
|
-
<tr>
|
|
250
|
-
<td rowspan="1" colSpan="1" >userId</td>
|
|
251
|
-
|
|
252
|
-
<td rowspan="1" colSpan="1" >String</td>
|
|
253
|
-
|
|
254
|
-
<td rowspan="1" colSpan="1" >被邀请的用户 ID</td>
|
|
255
|
-
</tr>
|
|
256
|
-
</table>
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
### onCallReceived
|
|
260
|
-
|
|
261
|
-
收到一个新的来电请求回调,被叫会收到,您可以通过监听这个事件,来决定是否显示通话接听界面。
|
|
262
|
-
``` java
|
|
263
|
-
TUICallEngine.instance.addObserver(TUICallObserver(
|
|
264
|
-
onCallReceived: (String callId, String callerId, List<String> calleeIdList, TUICallMediaType mediaType, CallObserverExtraInfo info) {
|
|
265
|
-
// TODO
|
|
266
|
-
}
|
|
267
|
-
));
|
|
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" >String</td>
|
|
284
|
-
|
|
285
|
-
<td rowspan="1" colSpan="1" >此次通话的唯一 ID</td>
|
|
286
|
-
</tr>
|
|
287
|
-
|
|
288
|
-
<tr>
|
|
289
|
-
<td rowspan="1" colSpan="1" >callerId</td>
|
|
290
|
-
|
|
291
|
-
<td rowspan="1" colSpan="1" >String</td>
|
|
292
|
-
|
|
293
|
-
<td rowspan="1" colSpan="1" >主叫 ID(邀请方)</td>
|
|
294
|
-
</tr>
|
|
295
|
-
|
|
296
|
-
<tr>
|
|
297
|
-
<td rowspan="1" colSpan="1" >calleeIdList</td>
|
|
298
|
-
|
|
299
|
-
<td rowspan="1" colSpan="1" >List<String></td>
|
|
300
|
-
|
|
301
|
-
<td rowspan="1" colSpan="1" >被叫 ID 列表(被邀请方)</td>
|
|
302
|
-
</tr>
|
|
303
|
-
|
|
304
|
-
<tr>
|
|
305
|
-
<td rowspan="1" colSpan="1" >mediaType</td>
|
|
306
|
-
|
|
307
|
-
<td rowspan="1" colSpan="1" >[TUICallMediaType](https://write.woa.com/document/109226385552285696)</td>
|
|
308
|
-
|
|
309
|
-
<td rowspan="1" colSpan="1" >通话的媒体类型,示例:`TUICallMediaType.video` 或 `TUICallMediaType.audio`</td>
|
|
310
|
-
</tr>
|
|
311
|
-
|
|
312
|
-
<tr>
|
|
313
|
-
<td rowspan="1" colSpan="1" >info</td>
|
|
314
|
-
|
|
315
|
-
<td rowspan="1" colSpan="1" >[CallObserverExtraInfo](https://write.woa.com/document/109226385552285696)</td>
|
|
316
|
-
|
|
317
|
-
<td rowspan="1" colSpan="1" >扩展信息</td>
|
|
318
|
-
</tr>
|
|
319
|
-
</table>
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
### onCallNotConnected
|
|
323
|
-
|
|
324
|
-
通话取消的回调
|
|
325
|
-
``` java
|
|
326
|
-
TUICallEngine.instance.addObserver(TUICallObserver(
|
|
327
|
-
onCallNotConnected: (String callId, TUICallMediaType mediaType, CallEndReason reason,
|
|
328
|
-
String userId, CallObserverExtraInfo info) {
|
|
329
|
-
// TODO
|
|
330
|
-
}
|
|
331
|
-
));
|
|
332
|
-
```
|
|
333
|
-
|
|
334
|
-
参数如下表所示:
|
|
335
|
-
<table>
|
|
336
|
-
<tr>
|
|
337
|
-
<td rowspan="1" colSpan="1" >参数</td>
|
|
338
|
-
|
|
339
|
-
<td rowspan="1" colSpan="1" >类型</td>
|
|
340
|
-
|
|
341
|
-
<td rowspan="1" colSpan="1" >含义</td>
|
|
342
|
-
</tr>
|
|
343
|
-
|
|
344
|
-
<tr>
|
|
345
|
-
<td rowspan="1" colSpan="1" >callId</td>
|
|
346
|
-
|
|
347
|
-
<td rowspan="1" colSpan="1" >String</td>
|
|
348
|
-
|
|
349
|
-
<td rowspan="1" colSpan="1" >此次通话的唯一 ID</td>
|
|
350
|
-
</tr>
|
|
351
|
-
|
|
352
|
-
<tr>
|
|
353
|
-
<td rowspan="1" colSpan="1" >mediaType</td>
|
|
354
|
-
|
|
355
|
-
<td rowspan="1" colSpan="1" >[TUICallMediaType](https://write.woa.com/document/109226385552285696)</td>
|
|
356
|
-
|
|
357
|
-
<td rowspan="1" colSpan="1" >通话的媒体类型,示例:`TUICallMediaType.video` 或 `TUICallMediaType.audio`</td>
|
|
358
|
-
</tr>
|
|
359
|
-
|
|
360
|
-
<tr>
|
|
361
|
-
<td rowspan="1" colSpan="1" >reason</td>
|
|
362
|
-
|
|
363
|
-
<td rowspan="1" colSpan="1" >[CallEndReason](https://write.woa.com/document/109226385552285696)</td>
|
|
364
|
-
|
|
365
|
-
<td rowspan="1" colSpan="1" >通话结束的原因</td>
|
|
366
|
-
</tr>
|
|
367
|
-
|
|
368
|
-
<tr>
|
|
369
|
-
<td rowspan="1" colSpan="1" >userId</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" >info</td>
|
|
378
|
-
|
|
379
|
-
<td rowspan="1" colSpan="1" >[CallObserverExtraInfo](https://write.woa.com/document/109226385552285696)</td>
|
|
380
|
-
|
|
381
|
-
<td rowspan="1" colSpan="1" >扩展信息</td>
|
|
382
|
-
</tr>
|
|
383
|
-
</table>
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
### onCallBegin
|
|
387
|
-
|
|
388
|
-
表示通话接通,主叫和被叫都可以收到,您可以通过监听这个事件来开启云端录制、内容审核等流程。
|
|
389
|
-
``` java
|
|
390
|
-
TUICallEngine.instance.addObserver(TUICallObserver(
|
|
391
|
-
onCallBegin: (String callId, TUICallMediaType mediaType, CallObserverExtraInfo info) {
|
|
392
|
-
// TODO
|
|
393
|
-
}
|
|
394
|
-
));
|
|
395
|
-
```
|
|
396
|
-
|
|
397
|
-
参数如下表所示:
|
|
398
|
-
<table>
|
|
399
|
-
<tr>
|
|
400
|
-
<td rowspan="1" colSpan="1" >参数</td>
|
|
401
|
-
|
|
402
|
-
<td rowspan="1" colSpan="1" >类型</td>
|
|
403
|
-
|
|
404
|
-
<td rowspan="1" colSpan="1" >含义</td>
|
|
405
|
-
</tr>
|
|
406
|
-
|
|
407
|
-
<tr>
|
|
408
|
-
<td rowspan="1" colSpan="1" >callId</td>
|
|
409
|
-
|
|
410
|
-
<td rowspan="1" colSpan="1" >String</td>
|
|
411
|
-
|
|
412
|
-
<td rowspan="1" colSpan="1" >此次通话的唯一 ID</td>
|
|
413
|
-
</tr>
|
|
414
|
-
|
|
415
|
-
<tr>
|
|
416
|
-
<td rowspan="1" colSpan="1" >mediaType</td>
|
|
417
|
-
|
|
418
|
-
<td rowspan="1" colSpan="1" >[TUICallMediaType](https://write.woa.com/document/109226385552285696)</td>
|
|
419
|
-
|
|
420
|
-
<td rowspan="1" colSpan="1" >通话的媒体类型,示例:`TUICallMediaType.video` 或 `TUICallMediaType.audio`</td>
|
|
421
|
-
</tr>
|
|
422
|
-
|
|
423
|
-
<tr>
|
|
424
|
-
<td rowspan="1" colSpan="1" >info</td>
|
|
425
|
-
|
|
426
|
-
<td rowspan="1" colSpan="1" >[CallObserverExtraInfo](https://write.woa.com/document/109226385552285696)</td>
|
|
427
|
-
|
|
428
|
-
<td rowspan="1" colSpan="1" >扩展信息</td>
|
|
429
|
-
</tr>
|
|
430
|
-
</table>
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
### onCallEnd
|
|
434
|
-
|
|
435
|
-
表示通话接通,主叫和被叫都可以收到,您可以通过监听这个事件来显示通话时长、通话类型等信息,或者来停止云端的录制流程。
|
|
436
|
-
``` cpp
|
|
437
|
-
TUICallEngine.instance.addObserver(TUICallObserver(
|
|
438
|
-
onCallEnd: (String callId, TUICallMediaType mediaType, CallEndReason reason,
|
|
439
|
-
String userId, double totalTime, CallObserverExtraInfo info) {
|
|
440
|
-
// TODO
|
|
441
|
-
}
|
|
442
|
-
));
|
|
443
|
-
```
|
|
444
|
-
|
|
445
|
-
参数如下表所示:
|
|
446
|
-
<table>
|
|
447
|
-
<tr>
|
|
448
|
-
<td rowspan="1" colSpan="1" >参数</td>
|
|
449
|
-
|
|
450
|
-
<td rowspan="1" colSpan="1" >类型</td>
|
|
451
|
-
|
|
452
|
-
<td rowspan="1" colSpan="1" >含义</td>
|
|
453
|
-
</tr>
|
|
454
|
-
|
|
455
|
-
<tr>
|
|
456
|
-
<td rowspan="1" colSpan="1" >callId</td>
|
|
457
|
-
|
|
458
|
-
<td rowspan="1" colSpan="1" >String</td>
|
|
459
|
-
|
|
460
|
-
<td rowspan="1" colSpan="1" >此次通话的唯一 ID</td>
|
|
461
|
-
</tr>
|
|
462
|
-
|
|
463
|
-
<tr>
|
|
464
|
-
<td rowspan="1" colSpan="1" >mediaType</td>
|
|
465
|
-
|
|
466
|
-
<td rowspan="1" colSpan="1" >[TUICallMediaType](https://write.woa.com/document/109226385552285696)</td>
|
|
467
|
-
|
|
468
|
-
<td rowspan="1" colSpan="1" >通话的媒体类型,示例:`TUICallMediaType.video` 或 `TUICallMediaType.audio`</td>
|
|
469
|
-
</tr>
|
|
470
|
-
|
|
471
|
-
<tr>
|
|
472
|
-
<td rowspan="1" colSpan="1" >reason</td>
|
|
473
|
-
|
|
474
|
-
<td rowspan="1" colSpan="1" >[CallEndReason](https://write.woa.com/document/109226385552285696)</td>
|
|
475
|
-
|
|
476
|
-
<td rowspan="1" colSpan="1" >通话结束的原因</td>
|
|
477
|
-
</tr>
|
|
478
|
-
|
|
479
|
-
<tr>
|
|
480
|
-
<td rowspan="1" colSpan="1" >userId</td>
|
|
481
|
-
|
|
482
|
-
<td rowspan="1" colSpan="1" >String</td>
|
|
483
|
-
|
|
484
|
-
<td rowspan="1" colSpan="1" >结束通话的用户 ID</td>
|
|
485
|
-
</tr>
|
|
486
|
-
|
|
487
|
-
<tr>
|
|
488
|
-
<td rowspan="1" colSpan="1" >totalTime</td>
|
|
489
|
-
|
|
490
|
-
<td rowspan="1" colSpan="1" >double</td>
|
|
491
|
-
|
|
492
|
-
<td rowspan="1" colSpan="1" >此次通话的时长,单位 ms</td>
|
|
493
|
-
</tr>
|
|
494
|
-
|
|
495
|
-
<tr>
|
|
496
|
-
<td rowspan="1" colSpan="1" >info</td>
|
|
497
|
-
|
|
498
|
-
<td rowspan="1" colSpan="1" >[CallObserverExtraInfo](https://write.woa.com/document/109226385552285696)</td>
|
|
499
|
-
|
|
500
|
-
<td rowspan="1" colSpan="1" >扩展信息</td>
|
|
501
|
-
</tr>
|
|
502
|
-
</table>
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
> **注意:**
|
|
506
|
-
>
|
|
507
|
-
|
|
508
|
-
> 客户端的事件一般都会随着杀进程等异常事件丢失掉,如果您需要通过监听通话时长来完成计费等逻辑,建议可以使用 REST API 来完成这类流程。
|
|
509
|
-
>
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
### onUserReject
|
|
513
|
-
|
|
514
|
-
通话被拒绝的回调,在1v1 通话中,只有主叫方会收到拒绝回调,在群组通话中,所有被邀请者都可以收到该回调。
|
|
515
|
-
``` cpp
|
|
516
|
-
TUICallEngine.instance.addObserver(TUICallObserver(
|
|
517
|
-
onUserReject: (String userId) {
|
|
518
|
-
//您的回调处理逻辑
|
|
519
|
-
}
|
|
520
|
-
));
|
|
521
|
-
```
|
|
522
|
-
|
|
523
|
-
参数如下表所示:
|
|
524
|
-
<table>
|
|
525
|
-
<tr>
|
|
526
|
-
<td rowspan="1" colSpan="1" >参数</td>
|
|
527
|
-
|
|
528
|
-
<td rowspan="1" colSpan="1" >类型</td>
|
|
529
|
-
|
|
530
|
-
<td rowspan="1" colSpan="1" >含义</td>
|
|
531
|
-
</tr>
|
|
532
|
-
|
|
533
|
-
<tr>
|
|
534
|
-
<td rowspan="1" colSpan="1" >res.userId</td>
|
|
535
|
-
|
|
536
|
-
<td rowspan="1" colSpan="1" >String</td>
|
|
537
|
-
|
|
538
|
-
<td rowspan="1" colSpan="1" >拒绝用户的 ID</td>
|
|
539
|
-
</tr>
|
|
540
|
-
</table>
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
### onUserNoResponse
|
|
544
|
-
|
|
545
|
-
对方无回应的回调。
|
|
546
|
-
``` cpp
|
|
547
|
-
TUICallEngine.instance.addObserver(TUICallObserver(
|
|
548
|
-
onUserNoResponse: (String userId) {
|
|
549
|
-
//您的回调处理逻辑
|
|
550
|
-
}
|
|
551
|
-
));
|
|
552
|
-
```
|
|
553
|
-
|
|
554
|
-
参数如下表所示:
|
|
555
|
-
<table>
|
|
556
|
-
<tr>
|
|
557
|
-
<td rowspan="1" colSpan="1" >参数</td>
|
|
558
|
-
|
|
559
|
-
<td rowspan="1" colSpan="1" >类型</td>
|
|
560
|
-
|
|
561
|
-
<td rowspan="1" colSpan="1" >含义</td>
|
|
562
|
-
</tr>
|
|
563
|
-
|
|
564
|
-
<tr>
|
|
565
|
-
<td rowspan="1" colSpan="1" >userId</td>
|
|
566
|
-
|
|
567
|
-
<td rowspan="1" colSpan="1" >String</td>
|
|
568
|
-
|
|
569
|
-
<td rowspan="1" colSpan="1" >无响应用户的 ID</td>
|
|
570
|
-
</tr>
|
|
571
|
-
</table>
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
### onUserLineBusy
|
|
575
|
-
|
|
576
|
-
通话忙线回调。
|
|
577
|
-
``` cpp
|
|
578
|
-
TUICallEngine.instance.addObserver(TUICallObserver(
|
|
579
|
-
onUserLineBusy: (String onUserLineBusy) {
|
|
580
|
-
//您的回调处理逻辑
|
|
581
|
-
},
|
|
582
|
-
));
|
|
583
|
-
```
|
|
584
|
-
|
|
585
|
-
参数如下表所示:
|
|
586
|
-
<table>
|
|
587
|
-
<tr>
|
|
588
|
-
<td rowspan="1" colSpan="1" >参数</td>
|
|
589
|
-
|
|
590
|
-
<td rowspan="1" colSpan="1" >类型</td>
|
|
591
|
-
|
|
592
|
-
<td rowspan="1" colSpan="1" >含义</td>
|
|
593
|
-
</tr>
|
|
594
|
-
|
|
595
|
-
<tr>
|
|
596
|
-
<td rowspan="1" colSpan="1" >userId</td>
|
|
597
|
-
|
|
598
|
-
<td rowspan="1" colSpan="1" >String</td>
|
|
599
|
-
|
|
600
|
-
<td rowspan="1" colSpan="1" >忙线用户的 ID</td>
|
|
601
|
-
</tr>
|
|
602
|
-
</table>
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
### onUserJoin
|
|
606
|
-
|
|
607
|
-
有用户进入此次通话的回调。
|
|
608
|
-
``` cpp
|
|
609
|
-
TUICallEngine.instance.addObserver(TUICallObserver(
|
|
610
|
-
onUserJoin: (String userId) {
|
|
611
|
-
//您的回调处理逻辑
|
|
612
|
-
}
|
|
613
|
-
));
|
|
614
|
-
```
|
|
615
|
-
|
|
616
|
-
参数如下表所示:
|
|
617
|
-
<table>
|
|
618
|
-
<tr>
|
|
619
|
-
<td rowspan="1" colSpan="1" >参数</td>
|
|
620
|
-
|
|
621
|
-
<td rowspan="1" colSpan="1" >类型</td>
|
|
622
|
-
|
|
623
|
-
<td rowspan="1" colSpan="1" >含义</td>
|
|
624
|
-
</tr>
|
|
625
|
-
|
|
626
|
-
<tr>
|
|
627
|
-
<td rowspan="1" colSpan="1" >userId</td>
|
|
628
|
-
|
|
629
|
-
<td rowspan="1" colSpan="1" >String</td>
|
|
630
|
-
|
|
631
|
-
<td rowspan="1" colSpan="1" >加入当前通话的用户 ID</td>
|
|
632
|
-
</tr>
|
|
633
|
-
</table>
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
### onUserLeave
|
|
637
|
-
|
|
638
|
-
有用户离开此次通话的回调。
|
|
639
|
-
``` cpp
|
|
640
|
-
TUICallEngine.instance.addObserver(TUICallObserver(
|
|
641
|
-
onUserLeave: (String userId) {
|
|
642
|
-
//您的回调处理逻辑
|
|
643
|
-
}
|
|
644
|
-
));
|
|
645
|
-
```
|
|
646
|
-
|
|
647
|
-
参数如下表所示:
|
|
648
|
-
<table>
|
|
649
|
-
<tr>
|
|
650
|
-
<td rowspan="1" colSpan="1" >参数</td>
|
|
651
|
-
|
|
652
|
-
<td rowspan="1" colSpan="1" >类型</td>
|
|
653
|
-
|
|
654
|
-
<td rowspan="1" colSpan="1" >含义</td>
|
|
655
|
-
</tr>
|
|
656
|
-
|
|
657
|
-
<tr>
|
|
658
|
-
<td rowspan="1" colSpan="1" >userId</td>
|
|
659
|
-
|
|
660
|
-
<td rowspan="1" colSpan="1" >String</td>
|
|
661
|
-
|
|
662
|
-
<td rowspan="1" colSpan="1" >离开当前通话的用户 ID</td>
|
|
663
|
-
</tr>
|
|
664
|
-
</table>
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
### onUserVideoAvailable
|
|
668
|
-
|
|
669
|
-
用户是否开启视频上行回调。
|
|
670
|
-
``` cpp
|
|
671
|
-
TUICallEngine.instance.addObserver(TUICallObserver(
|
|
672
|
-
onUserVideoAvailable: (String userId, bool isVideoAvailable) {
|
|
673
|
-
//您的回调处理逻辑
|
|
674
|
-
}
|
|
675
|
-
));
|
|
676
|
-
```
|
|
677
|
-
|
|
678
|
-
参数如下表所示:
|
|
679
|
-
<table>
|
|
680
|
-
<tr>
|
|
681
|
-
<td rowspan="1" colSpan="1" >参数</td>
|
|
682
|
-
|
|
683
|
-
<td rowspan="1" colSpan="1" >类型</td>
|
|
684
|
-
|
|
685
|
-
<td rowspan="1" colSpan="1" >含义</td>
|
|
686
|
-
</tr>
|
|
687
|
-
|
|
688
|
-
<tr>
|
|
689
|
-
<td rowspan="1" colSpan="1" >userId</td>
|
|
690
|
-
|
|
691
|
-
<td rowspan="1" colSpan="1" >String</td>
|
|
692
|
-
|
|
693
|
-
<td rowspan="1" colSpan="1" >通话用户 ID</td>
|
|
694
|
-
</tr>
|
|
695
|
-
|
|
696
|
-
<tr>
|
|
697
|
-
<td rowspan="1" colSpan="1" >isVideoAvailable</td>
|
|
698
|
-
|
|
699
|
-
<td rowspan="1" colSpan="1" >bool</td>
|
|
700
|
-
|
|
701
|
-
<td rowspan="1" colSpan="1" >用户视频是否可用</td>
|
|
702
|
-
</tr>
|
|
703
|
-
</table>
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
### onUserAudioAvailable
|
|
707
|
-
|
|
708
|
-
用户是否开启音频上行回调。
|
|
709
|
-
``` cpp
|
|
710
|
-
TUICallEngine.instance.addObserver(TUICallObserver(
|
|
711
|
-
onUserAudioAvailable: (String userId, bool isAudioAvailable) {
|
|
712
|
-
//您的回调处理逻辑
|
|
713
|
-
}
|
|
714
|
-
));
|
|
715
|
-
```
|
|
716
|
-
|
|
717
|
-
参数如下表所示:
|
|
718
|
-
<table>
|
|
719
|
-
<tr>
|
|
720
|
-
<td rowspan="1" colSpan="1" >参数</td>
|
|
721
|
-
|
|
722
|
-
<td rowspan="1" colSpan="1" >类型</td>
|
|
723
|
-
|
|
724
|
-
<td rowspan="1" colSpan="1" >含义</td>
|
|
725
|
-
</tr>
|
|
726
|
-
|
|
727
|
-
<tr>
|
|
728
|
-
<td rowspan="1" colSpan="1" >userId</td>
|
|
729
|
-
|
|
730
|
-
<td rowspan="1" colSpan="1" >String</td>
|
|
731
|
-
|
|
732
|
-
<td rowspan="1" colSpan="1" >用户 ID</td>
|
|
733
|
-
</tr>
|
|
734
|
-
|
|
735
|
-
<tr>
|
|
736
|
-
<td rowspan="1" colSpan="1" >isAudioAvailable</td>
|
|
737
|
-
|
|
738
|
-
<td rowspan="1" colSpan="1" >bool</td>
|
|
739
|
-
|
|
740
|
-
<td rowspan="1" colSpan="1" >用户音频是否可用</td>
|
|
741
|
-
</tr>
|
|
742
|
-
</table>
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
### onUserVoiceVolumeChanged
|
|
746
|
-
|
|
747
|
-
用户通话音量的回调。
|
|
748
|
-
``` cpp
|
|
749
|
-
TUICallEngine.instance.addObserver(TUICallObserver(
|
|
750
|
-
onUserVoiceVolumeChanged: (Map<String, int> volumeMap) {
|
|
751
|
-
//您的回调处理逻辑
|
|
752
|
-
}
|
|
753
|
-
));
|
|
754
|
-
```
|
|
755
|
-
|
|
756
|
-
参数如下表所示:
|
|
757
|
-
<table>
|
|
758
|
-
<tr>
|
|
759
|
-
<td rowspan="1" colSpan="1" >参数</td>
|
|
760
|
-
|
|
761
|
-
<td rowspan="1" colSpan="1" >类型</td>
|
|
762
|
-
|
|
763
|
-
<td rowspan="1" colSpan="1" >含义</td>
|
|
764
|
-
</tr>
|
|
765
|
-
|
|
766
|
-
<tr>
|
|
767
|
-
<td rowspan="1" colSpan="1" >volumeMap</td>
|
|
768
|
-
|
|
769
|
-
<td rowspan="1" colSpan="1" >Map<String, int></td>
|
|
770
|
-
|
|
771
|
-
<td rowspan="1" colSpan="1" >音量表,根据每个 userId 可以获取对应用户的音量大小,音量最小值为0,音量最大值为100</td>
|
|
772
|
-
</tr>
|
|
773
|
-
</table>
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
### onUserNetworkQualityChanged
|
|
777
|
-
|
|
778
|
-
用户网络质量的回调。
|
|
779
|
-
``` cpp
|
|
780
|
-
TUICallEngine.instance.addObserver(TUICallObserver(
|
|
781
|
-
onUserNetworkQualityChanged: (List<TUINetworkQualityInfo> networkQualityList) {
|
|
782
|
-
//您的回调处理逻辑
|
|
783
|
-
}
|
|
784
|
-
));
|
|
785
|
-
|
|
786
|
-
//TUINetworkQualityInfo的定义如下:
|
|
787
|
-
class TUINetworkQualityInfo {
|
|
788
|
-
String userId;
|
|
789
|
-
TUINetworkQuality quality;
|
|
790
|
-
TUINetworkQualityInfo({required this.userId, required this.quality});
|
|
791
|
-
}
|
|
792
|
-
// TUINetworkQuality的定义如下:
|
|
793
|
-
enum TUINetworkQuality {
|
|
794
|
-
unknown,
|
|
795
|
-
excellent,
|
|
796
|
-
good,
|
|
797
|
-
poor,
|
|
798
|
-
bad,
|
|
799
|
-
vBad,
|
|
800
|
-
down
|
|
801
|
-
}
|
|
802
|
-
```
|
|
803
|
-
|
|
804
|
-
参数如下表所示:
|
|
805
|
-
<table>
|
|
806
|
-
<tr>
|
|
807
|
-
<td rowspan="1" colSpan="1" >参数</td>
|
|
808
|
-
|
|
809
|
-
<td rowspan="1" colSpan="1" >类型</td>
|
|
810
|
-
|
|
811
|
-
<td rowspan="1" colSpan="1" >含义</td>
|
|
812
|
-
</tr>
|
|
813
|
-
|
|
814
|
-
<tr>
|
|
815
|
-
<td rowspan="1" colSpan="1" >networkQualityList</td>
|
|
816
|
-
|
|
817
|
-
<td rowspan="1" colSpan="1" >List<[TUINetworkQualityInfo](https://write.woa.com/document/109226385552285696)></td>
|
|
818
|
-
|
|
819
|
-
<td rowspan="1" colSpan="1" >网络状态,根据每个 userId 可以获取对应用户当前的网络质量</td>
|
|
820
|
-
</tr>
|
|
821
|
-
</table>
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
### onKickedOffline
|
|
825
|
-
|
|
826
|
-
当前用户被踢下线:此时可以 UI 提示用户,并再次重新调用初始化。
|
|
827
|
-
``` cpp
|
|
828
|
-
TUICallEngine.instance.addObserver(TUICallObserver(
|
|
829
|
-
onKickedOffline: () {
|
|
830
|
-
//您的回调处理逻辑
|
|
831
|
-
}
|
|
832
|
-
));
|
|
833
|
-
```
|
|
834
|
-
|
|
835
|
-
### onUserSigExpired
|
|
836
|
-
|
|
837
|
-
在线时票据过期:此时您需要生成新的 userSig,并再次重新调用初始化。
|
|
838
|
-
``` cpp
|
|
839
|
-
TUICallEngine.instance.addObserver(TUICallObserver(
|
|
840
|
-
onUserSigExpired: () {
|
|
841
|
-
//您的回调处理逻辑
|
|
842
|
-
}
|
|
843
|
-
));
|
|
844
|
-
```
|
|
845
|
-
|
|
846
|
-
## 废弃回调
|
|
847
|
-
|
|
848
|
-
### onCallCancelled
|
|
849
|
-
|
|
850
|
-
表示此次通话主叫取消、被叫超时、拒接等,涉及多个场景,您可以通过监听这个事件来实现类似未接来电、重置 UI 状态等显示逻辑。
|
|
851
|
-
- 主叫取消:主叫收到该回调(userId 为自己);被叫收到该回调(userId 为**主叫的 ID)。**
|
|
852
|
-
|
|
853
|
-
- 被叫超时:主叫会同时收到 [onUserNoResponse](https://write.woa.com/document/94733532341563392) 和 onCallCancelled 回调(userId 是自己的 ID);被叫收到 onCallCancelled 回调(userId 是自己的 ID)。
|
|
854
|
-
|
|
855
|
-
- 被叫拒接:主叫会同时收到 [onUserReject](https://write.woa.com/document/94733532341563392) 和 onCallCancelled 回调(userId 是自己的 ID);被叫收到 onCallCancelled 回调(userId 是自己的 ID)。
|
|
856
|
-
|
|
857
|
-
- 被叫忙线:主叫会同时收到 [onUserLineBusy](https://write.woa.com/document/94733532341563392) 和 onCallCancelled 回调(userId 是自己的 ID)。
|
|
858
|
-
|
|
859
|
-
- 异常中断:被叫接收通话失败,收到该回调(userId 是自己的 ID)。
|
|
860
|
-
|
|
861
|
-
``` cpp
|
|
862
|
-
TUICallEngine.instance.addObserver(TUICallObserver(
|
|
863
|
-
onCallCancelled: (String userId) {
|
|
864
|
-
//您的回调处理逻辑
|
|
865
|
-
}
|
|
866
|
-
));
|
|
867
|
-
```
|
|
868
|
-
|
|
869
|
-
参数如下表所示:
|
|
870
|
-
|
|
871
|
-
<table>
|
|
872
|
-
<tr>
|
|
873
|
-
<td rowspan="1" colSpan="1" >参数</td>
|
|
874
|
-
|
|
875
|
-
<td rowspan="1" colSpan="1" >类型</td>
|
|
876
|
-
|
|
877
|
-
<td rowspan="1" colSpan="1" >含义</td>
|
|
878
|
-
</tr>
|
|
879
|
-
|
|
880
|
-
<tr>
|
|
881
|
-
<td rowspan="1" colSpan="1" >userId</td>
|
|
882
|
-
|
|
883
|
-
<td rowspan="1" colSpan="1" >String</td>
|
|
884
|
-
|
|
885
|
-
<td rowspan="1" colSpan="1" >用户的 ID</td>
|
|
886
|
-
</tr>
|
|
887
|
-
</table>
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
### onCallMediaTypeChanged
|
|
891
|
-
|
|
892
|
-
表示通话的媒体类型发生变化。
|
|
893
|
-
``` cpp
|
|
894
|
-
TUICallEngine.instance.addObserver(TUICallObserver(
|
|
895
|
-
onCallMediaTypeChanged: (TUICallMediaType oldCallMediaType, TUICallMediaType newCallMediaType) {
|
|
896
|
-
//您的回调处理逻辑
|
|
897
|
-
}
|
|
898
|
-
));
|
|
899
|
-
```
|
|
900
|
-
|
|
901
|
-
参数如下表所示:
|
|
902
|
-
<table>
|
|
903
|
-
<tr>
|
|
904
|
-
<td rowspan="1" colSpan="1" >参数</td>
|
|
905
|
-
|
|
906
|
-
<td rowspan="1" colSpan="1" >类型</td>
|
|
907
|
-
|
|
908
|
-
<td rowspan="1" colSpan="1" >含义</td>
|
|
909
|
-
</tr>
|
|
910
|
-
|
|
911
|
-
<tr>
|
|
912
|
-
<td rowspan="1" colSpan="1" >oldCallMediaType</td>
|
|
913
|
-
|
|
914
|
-
<td rowspan="1" colSpan="1" >[TUICallMediaType](https://write.woa.com/document/109226385552285696)</td>
|
|
915
|
-
|
|
916
|
-
<td rowspan="1" colSpan="1" >通话的媒体类型,示例:`TUICallMediaType.video` 或 `TUICallMediaType.audio`</td>
|
|
917
|
-
</tr>
|
|
918
|
-
|
|
919
|
-
<tr>
|
|
920
|
-
<td rowspan="1" colSpan="1" >newCallMediaType</td>
|
|
921
|
-
|
|
922
|
-
<td rowspan="1" colSpan="1" >[TUICallMediaType](https://write.woa.com/document/109226385552285696)</td>
|
|
923
|
-
|
|
924
|
-
<td rowspan="1" colSpan="1" >通话的媒体类型,示例:`TUICallMediaType.video` 或 `TUICallMediaType.audio`</td>
|
|
925
|
-
</tr>
|
|
926
|
-
</table>
|