@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,635 @@
|
|
|
1
|
+
## TUICallKit API 简介
|
|
2
|
+
|
|
3
|
+
TUICallKit API 是音视频通话组件的**含 UI 接口**,使用TUICallKit API,您可以通过简单接口快速实现一个类微信的音视频通话场景,更详细的接入步骤,详情请参见 [快速接入TUICallKit](https://cloud.tencent.com/document/product/647/78730)。
|
|
4
|
+
|
|
5
|
+
## API 概览
|
|
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" >[createInstance](https://cloud.tencent.com/document/product/647/78753#createInstance)</td>
|
|
15
|
+
|
|
16
|
+
<td rowspan="1" colSpan="1" >创建 TUICallKit 实例(单例模式)</td>
|
|
17
|
+
</tr>
|
|
18
|
+
|
|
19
|
+
<tr>
|
|
20
|
+
<td rowspan="1" colSpan="1" >[setSelfInfo](https://cloud.tencent.com/document/product/647/78753#setSelfInfo)</td>
|
|
21
|
+
|
|
22
|
+
<td rowspan="1" colSpan="1" >设置用户的昵称、头像</td>
|
|
23
|
+
</tr>
|
|
24
|
+
|
|
25
|
+
<tr>
|
|
26
|
+
<td rowspan="1" colSpan="1" >[calls](https://cloud.tencent.com/document/product/647/78753#calls)</td>
|
|
27
|
+
|
|
28
|
+
<td rowspan="1" colSpan="1" >发起单人或多人通话</td>
|
|
29
|
+
</tr>
|
|
30
|
+
|
|
31
|
+
<tr>
|
|
32
|
+
<td rowspan="1" colSpan="1" >[join](https://cloud.tencent.com/document/product/647/78753#join)</td>
|
|
33
|
+
|
|
34
|
+
<td rowspan="1" colSpan="1" >主动加入通话</td>
|
|
35
|
+
</tr>
|
|
36
|
+
|
|
37
|
+
<tr>
|
|
38
|
+
<td rowspan="1" colSpan="1" >[setCallingBell](https://cloud.tencent.com/document/product/647/78753#setCallingBell)</td>
|
|
39
|
+
|
|
40
|
+
<td rowspan="1" colSpan="1" >设置自定义来电铃音</td>
|
|
41
|
+
</tr>
|
|
42
|
+
|
|
43
|
+
<tr>
|
|
44
|
+
<td rowspan="1" colSpan="1" >[enableMuteMode](https://cloud.tencent.com/document/product/647/78753#enableMuteMode)</td>
|
|
45
|
+
|
|
46
|
+
<td rowspan="1" colSpan="1" >开启/关闭静音模式</td>
|
|
47
|
+
</tr>
|
|
48
|
+
|
|
49
|
+
<tr>
|
|
50
|
+
<td rowspan="1" colSpan="1" >[enableFloatWindow](https://cloud.tencent.com/document/product/647/78753#enableFloatWindow)</td>
|
|
51
|
+
|
|
52
|
+
<td rowspan="1" colSpan="1" >开启/关闭悬浮窗功能</td>
|
|
53
|
+
</tr>
|
|
54
|
+
|
|
55
|
+
<tr>
|
|
56
|
+
<td rowspan="1" colSpan="1" >[enableIncomingBanner](https://cloud.tencent.com/document/product/647/78753#enableIncomingBanner)</td>
|
|
57
|
+
|
|
58
|
+
<td rowspan="1" colSpan="1" >开启/关闭来电横幅显示</td>
|
|
59
|
+
</tr>
|
|
60
|
+
</table>
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
## API 详情
|
|
64
|
+
|
|
65
|
+
### createInstance
|
|
66
|
+
|
|
67
|
+
创建 TUICallKit 的单例。
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
【Objective-C】
|
|
73
|
+
``` objectivec
|
|
74
|
+
- (instancetype)createInstance;
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
【Swift】
|
|
79
|
+
``` swift
|
|
80
|
+
public static func createInstance() -> TUICallKit
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### setSelfInfo
|
|
84
|
+
|
|
85
|
+
设置用户昵称、头像。用户昵称不能超过500字节,用户头像必须是 URL 格式。
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
【Objective-C】
|
|
91
|
+
``` objectivec
|
|
92
|
+
- (void)setSelfInfo:(NSString * _Nullable)nickname avatar:(NSString * _Nullable)avatar succ:(TUICallSucc)succ fail:(TUICallFail)fail;
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
【Swift】
|
|
97
|
+
``` swift
|
|
98
|
+
public func setSelfInfo(nickname: String, avatar: String, succ:@escaping TUICallSucc, fail: @escaping TUICallFail)
|
|
99
|
+
```
|
|
100
|
+
<table>
|
|
101
|
+
<tr>
|
|
102
|
+
<td rowspan="1" colSpan="1" >参数</td>
|
|
103
|
+
|
|
104
|
+
<td rowspan="1" colSpan="1" >类型</td>
|
|
105
|
+
|
|
106
|
+
<td rowspan="1" colSpan="1" >含义</td>
|
|
107
|
+
</tr>
|
|
108
|
+
|
|
109
|
+
<tr>
|
|
110
|
+
<td rowspan="1" colSpan="1" >nickname</td>
|
|
111
|
+
|
|
112
|
+
<td rowspan="1" colSpan="1" >NSString</td>
|
|
113
|
+
|
|
114
|
+
<td rowspan="1" colSpan="1" >用户昵称</td>
|
|
115
|
+
</tr>
|
|
116
|
+
|
|
117
|
+
<tr>
|
|
118
|
+
<td rowspan="1" colSpan="1" >avatar</td>
|
|
119
|
+
|
|
120
|
+
<td rowspan="1" colSpan="1" >NSString</td>
|
|
121
|
+
|
|
122
|
+
<td rowspan="1" colSpan="1" >用户头像(格式为 URL)</td>
|
|
123
|
+
</tr>
|
|
124
|
+
|
|
125
|
+
<tr>
|
|
126
|
+
<td rowspan="1" colSpan="1" >succ</td>
|
|
127
|
+
|
|
128
|
+
<td rowspan="1" colSpan="1" >TUICallSucc</td>
|
|
129
|
+
|
|
130
|
+
<td rowspan="1" colSpan="1" >成功回调</td>
|
|
131
|
+
</tr>
|
|
132
|
+
|
|
133
|
+
<tr>
|
|
134
|
+
<td rowspan="1" colSpan="1" >fail</td>
|
|
135
|
+
|
|
136
|
+
<td rowspan="1" colSpan="1" >TUICallFail</td>
|
|
137
|
+
|
|
138
|
+
<td rowspan="1" colSpan="1" >失败回调</td>
|
|
139
|
+
</tr>
|
|
140
|
+
</table>
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
### calls
|
|
144
|
+
|
|
145
|
+
发起通话。
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
【Swift】
|
|
151
|
+
``` swift
|
|
152
|
+
func calls(userIdList: [String], callMediaType: TUICallMediaType, params: TUICallParams,
|
|
153
|
+
succ: @escaping TUICallSucc, fail: @escaping TUICallFail)
|
|
154
|
+
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
【Objective-C】
|
|
159
|
+
``` objectivec
|
|
160
|
+
- (void)calls:(NSArray<NSString *> *)userIdList callMediaType:(TUICallMediaType)callMediaType params:(TUICallParams *)params succ:(TUICallSucc)succ fail:(TUICallFail)fail;
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
参数如下表所示:
|
|
164
|
+
<table>
|
|
165
|
+
<tr>
|
|
166
|
+
<td rowspan="1" colSpan="1" >参数</td>
|
|
167
|
+
|
|
168
|
+
<td rowspan="1" colSpan="1" >类型</td>
|
|
169
|
+
|
|
170
|
+
<td rowspan="1" colSpan="1" >含义</td>
|
|
171
|
+
</tr>
|
|
172
|
+
|
|
173
|
+
<tr>
|
|
174
|
+
<td rowspan="1" colSpan="1" >userIdList</td>
|
|
175
|
+
|
|
176
|
+
<td rowspan="1" colSpan="1" > NSArray</td>
|
|
177
|
+
|
|
178
|
+
<td rowspan="1" colSpan="1" >目标用户的 userId 列表</td>
|
|
179
|
+
</tr>
|
|
180
|
+
|
|
181
|
+
<tr>
|
|
182
|
+
<td rowspan="1" colSpan="1" >callMediaType</td>
|
|
183
|
+
|
|
184
|
+
<td rowspan="1" colSpan="1" >[TUICallMediaType](https://cloud.tencent.com/document/product/647/90446#MediaType)</td>
|
|
185
|
+
|
|
186
|
+
<td rowspan="1" colSpan="1" >通话的媒体类型,比如视频通话、语音通话</td>
|
|
187
|
+
</tr>
|
|
188
|
+
|
|
189
|
+
<tr>
|
|
190
|
+
<td rowspan="1" colSpan="1" >params</td>
|
|
191
|
+
|
|
192
|
+
<td rowspan="1" colSpan="1" >[TUICallParams](https://cloud.tencent.com/document/product/647/90446#CallParams)</td>
|
|
193
|
+
|
|
194
|
+
<td rowspan="1" colSpan="1" >通话扩展参数,例如:房间号、通话邀请超时时间,离线推送自定义内容等</td>
|
|
195
|
+
</tr>
|
|
196
|
+
</table>
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
### join
|
|
200
|
+
|
|
201
|
+
主动加入通话。
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
【Swift】
|
|
207
|
+
``` java
|
|
208
|
+
func join(callId: String)
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
【Objective-C】
|
|
213
|
+
``` java
|
|
214
|
+
- (void)join:(NSString *)callId;
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
参数如下表所示:
|
|
218
|
+
<table>
|
|
219
|
+
<tr>
|
|
220
|
+
<td rowspan="1" colSpan="1" >参数</td>
|
|
221
|
+
|
|
222
|
+
<td rowspan="1" colSpan="1" >类型</td>
|
|
223
|
+
|
|
224
|
+
<td rowspan="1" colSpan="1" >含义</td>
|
|
225
|
+
</tr>
|
|
226
|
+
|
|
227
|
+
<tr>
|
|
228
|
+
<td rowspan="1" colSpan="1" >callId</td>
|
|
229
|
+
|
|
230
|
+
<td rowspan="1" colSpan="1" >NSString</td>
|
|
231
|
+
|
|
232
|
+
<td rowspan="1" colSpan="1" >此次通话的唯一 ID</td>
|
|
233
|
+
</tr>
|
|
234
|
+
</table>
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
### setCallingBell
|
|
238
|
+
|
|
239
|
+
设置自定义来电铃音。
|
|
240
|
+
这里仅限传入本地文件地址,需要确保该文件目录是应用可以访问的。
|
|
241
|
+
- 铃声设置后与设备绑定,更换用户,铃声依旧会生效。
|
|
242
|
+
|
|
243
|
+
- 如需恢复默认铃声,`filePath` 传空即可。
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
【Objective-C】
|
|
250
|
+
``` objectivec
|
|
251
|
+
- (void)setCallingBell:(NSString *)filePath;
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
【Swift】
|
|
256
|
+
``` swift
|
|
257
|
+
public func setCallingBell(filePath: String)
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
### enableMuteMode
|
|
262
|
+
|
|
263
|
+
开启后,收到通话请求,不会播放来电铃声。
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
【Objective-C】
|
|
269
|
+
``` objectivec
|
|
270
|
+
- (void)enableMuteMode:(BOOL)enable;
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
【Swift】
|
|
275
|
+
``` swift
|
|
276
|
+
public func enableMuteMode(enable: Bool)
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
### enableFloatWindow
|
|
280
|
+
|
|
281
|
+
开启/关闭悬浮窗功能。
|
|
282
|
+
默认为`false`,通话界面左上角的悬浮窗按钮隐藏,设置为 true 后显示。
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
【Objective-C】
|
|
288
|
+
``` objectivec
|
|
289
|
+
- (void)enableFloatWindow:(BOOL)enable;
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
【Swift】
|
|
294
|
+
``` swift
|
|
295
|
+
public func enableFloatWindow(enable: Bool)
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
### enableIncomingBanner
|
|
299
|
+
|
|
300
|
+
开启/关闭来电横幅显示。
|
|
301
|
+
|
|
302
|
+
默认为`false`,被叫端收到邀请后默认弹出全屏通话等待界面,开启后先展示一个横幅,然后根据需要拉起全屏通话界面。
|
|
303
|
+
``` swift
|
|
304
|
+
public func enableIncomingBanner(enable: Bool)
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
## 废弃接口
|
|
308
|
+
|
|
309
|
+
### call
|
|
310
|
+
|
|
311
|
+
拨打电话(1v1通话)。**注意:建议使用 calls 接口。**
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
【Objective-C】
|
|
317
|
+
``` objectivec
|
|
318
|
+
- (void)call:(NSString *)userId callMediaType:(TUICallMediaType)callMediaType;
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
【Swift】
|
|
323
|
+
``` swift
|
|
324
|
+
public func call(userId: String, callMediaType: TUICallMediaType)
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
参数如下表所示:
|
|
328
|
+
<table>
|
|
329
|
+
<tr>
|
|
330
|
+
<td rowspan="1" colSpan="1" >参数</td>
|
|
331
|
+
|
|
332
|
+
<td rowspan="1" colSpan="1" >类型</td>
|
|
333
|
+
|
|
334
|
+
<td rowspan="1" colSpan="1" >含义</td>
|
|
335
|
+
</tr>
|
|
336
|
+
|
|
337
|
+
<tr>
|
|
338
|
+
<td rowspan="1" colSpan="1" >userId</td>
|
|
339
|
+
|
|
340
|
+
<td rowspan="1" colSpan="1" >NSString</td>
|
|
341
|
+
|
|
342
|
+
<td rowspan="1" colSpan="1" >目标用户的 userId</td>
|
|
343
|
+
</tr>
|
|
344
|
+
|
|
345
|
+
<tr>
|
|
346
|
+
<td rowspan="1" colSpan="1" >callMediaType</td>
|
|
347
|
+
|
|
348
|
+
<td rowspan="1" colSpan="1" >[TUICallMediaType](https://cloud.tencent.com/document/product/647/90446#MediaType)</td>
|
|
349
|
+
|
|
350
|
+
<td rowspan="1" colSpan="1" >通话的媒体类型,比如视频通话、语音通话</td>
|
|
351
|
+
</tr>
|
|
352
|
+
</table>
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
### call
|
|
356
|
+
|
|
357
|
+
拨打电话(1v1通话),支持自定义房间号、通话邀请超时时间,离线推送内容等。**注意:建议使用 calls 接口。**
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
【Objective-C】
|
|
363
|
+
``` objectivec
|
|
364
|
+
- (void)call:(NSString *)userId callMediaType:(TUICallMediaType)callMediaType params:(TUICallParams *)params succ:(TUICallSucc __nullable)succ fail:(TUICallFail __nullable)fail;
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
【Swift】
|
|
369
|
+
``` swift
|
|
370
|
+
public func call(userId: String, callMediaType: TUICallMediaType, params: TUICallParams,
|
|
371
|
+
succ: @escaping TUICallSucc, fail: @escaping TUICallFail)
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
参数如下表所示:
|
|
375
|
+
<table>
|
|
376
|
+
<tr>
|
|
377
|
+
<td rowspan="1" colSpan="1" >参数</td>
|
|
378
|
+
|
|
379
|
+
<td rowspan="1" colSpan="1" >类型</td>
|
|
380
|
+
|
|
381
|
+
<td rowspan="1" colSpan="1" >含义</td>
|
|
382
|
+
</tr>
|
|
383
|
+
|
|
384
|
+
<tr>
|
|
385
|
+
<td rowspan="1" colSpan="1" >userId</td>
|
|
386
|
+
|
|
387
|
+
<td rowspan="1" colSpan="1" >NSString</td>
|
|
388
|
+
|
|
389
|
+
<td rowspan="1" colSpan="1" >目标用户的 userId</td>
|
|
390
|
+
</tr>
|
|
391
|
+
|
|
392
|
+
<tr>
|
|
393
|
+
<td rowspan="1" colSpan="1" >callMediaType</td>
|
|
394
|
+
|
|
395
|
+
<td rowspan="1" colSpan="1" >[TUICallMediaType](https://cloud.tencent.com/document/product/647/90446#MediaType)</td>
|
|
396
|
+
|
|
397
|
+
<td rowspan="1" colSpan="1" >通话的媒体类型,比如视频通话、语音通话</td>
|
|
398
|
+
</tr>
|
|
399
|
+
|
|
400
|
+
<tr>
|
|
401
|
+
<td rowspan="1" colSpan="1" >params</td>
|
|
402
|
+
|
|
403
|
+
<td rowspan="1" colSpan="1" >[TUICallParams](https://cloud.tencent.com/document/product/647/90446#CallParams)</td>
|
|
404
|
+
|
|
405
|
+
<td rowspan="1" colSpan="1" >通话扩展参数,例如:房间号、通话邀请超时时间,离线推送自定义内容等</td>
|
|
406
|
+
</tr>
|
|
407
|
+
|
|
408
|
+
<tr>
|
|
409
|
+
<td rowspan="1" colSpan="1" >succ</td>
|
|
410
|
+
|
|
411
|
+
<td rowspan="1" colSpan="1" >TUICallSucc</td>
|
|
412
|
+
|
|
413
|
+
<td rowspan="1" colSpan="1" >成功回调</td>
|
|
414
|
+
</tr>
|
|
415
|
+
|
|
416
|
+
<tr>
|
|
417
|
+
<td rowspan="1" colSpan="1" >fail</td>
|
|
418
|
+
|
|
419
|
+
<td rowspan="1" colSpan="1" >TUICallFail</td>
|
|
420
|
+
|
|
421
|
+
<td rowspan="1" colSpan="1" >失败回调</td>
|
|
422
|
+
</tr>
|
|
423
|
+
</table>
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
### groupCall
|
|
427
|
+
|
|
428
|
+
发起群组通话。**注意:建议使用 calls 接口。**
|
|
429
|
+
|
|
430
|
+
> **注意:**
|
|
431
|
+
>
|
|
432
|
+
|
|
433
|
+
> 使用群组通话前需要创建 IM 群组,如果已经创建,请忽略。
|
|
434
|
+
>
|
|
435
|
+
|
|
436
|
+
> 群组的创建详见:[IM 群组管理](https://cloud.tencent.com/document/product/269/75394#.E5.88.9B.E5.BB.BA.E7.BE.A4.E7.BB.84) ,或者您也可以直接使用 [IM TUIKit](https://cloud.tencent.com/document/product/269/37059),一站式集成聊天、通话等场景。
|
|
437
|
+
>
|
|
438
|
+
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+
|
|
443
|
+
【Objective-C】
|
|
444
|
+
``` objectivec
|
|
445
|
+
- (void)groupCall:(NSString *)groupId userIdList:(NSArray<NSString *> *)userIdList callMediaType:(TUICallMediaType)callMediaType;
|
|
446
|
+
```
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
【Swift】
|
|
450
|
+
``` swift
|
|
451
|
+
public func groupCall(groupId: String, userIdList: [String], callMediaType: TUICallMediaType)
|
|
452
|
+
```
|
|
453
|
+
<table>
|
|
454
|
+
<tr>
|
|
455
|
+
<td rowspan="1" colSpan="1" >参数</td>
|
|
456
|
+
|
|
457
|
+
<td rowspan="1" colSpan="1" >类型</td>
|
|
458
|
+
|
|
459
|
+
<td rowspan="1" colSpan="1" >含义</td>
|
|
460
|
+
</tr>
|
|
461
|
+
|
|
462
|
+
<tr>
|
|
463
|
+
<td rowspan="1" colSpan="1" >groupId</td>
|
|
464
|
+
|
|
465
|
+
<td rowspan="1" colSpan="1" >NSString</td>
|
|
466
|
+
|
|
467
|
+
<td rowspan="1" colSpan="1" >此次群组通话的群 ID</td>
|
|
468
|
+
</tr>
|
|
469
|
+
|
|
470
|
+
<tr>
|
|
471
|
+
<td rowspan="1" colSpan="1" >userIdList</td>
|
|
472
|
+
|
|
473
|
+
<td rowspan="1" colSpan="1" >NSArray</td>
|
|
474
|
+
|
|
475
|
+
<td rowspan="1" colSpan="1" >目标用户的 userId 列表</td>
|
|
476
|
+
</tr>
|
|
477
|
+
|
|
478
|
+
<tr>
|
|
479
|
+
<td rowspan="1" colSpan="1" >callMediaType</td>
|
|
480
|
+
|
|
481
|
+
<td rowspan="1" colSpan="1" >[TUICallMediaType](https://cloud.tencent.com/document/product/647/90446#MediaType)</td>
|
|
482
|
+
|
|
483
|
+
<td rowspan="1" colSpan="1" >通话的媒体类型,比如视频通话、语音通话</td>
|
|
484
|
+
</tr>
|
|
485
|
+
</table>
|
|
486
|
+
|
|
487
|
+
|
|
488
|
+
### groupCall
|
|
489
|
+
|
|
490
|
+
发起群组通话,支持自定义房间号、通话邀请超时时间,离线推送内容等。**注意:建议使用 calls 接口。**
|
|
491
|
+
|
|
492
|
+
> **注意:**
|
|
493
|
+
>
|
|
494
|
+
|
|
495
|
+
> 使用群组通话前需要创建 IM 群组,如果已经创建,请忽略。
|
|
496
|
+
>
|
|
497
|
+
|
|
498
|
+
> 群组的创建详见:[IM 群组管理](https://cloud.tencent.com/document/product/269/75394#.E5.88.9B.E5.BB.BA.E7.BE.A4.E7.BB.84) ,或者您也可以直接使用 [IM TUIKit](https://cloud.tencent.com/document/product/269/37059),一站式集成聊天、通话等场景。
|
|
499
|
+
>
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
|
|
503
|
+
|
|
504
|
+
|
|
505
|
+
【Objective-C】
|
|
506
|
+
``` objectivec
|
|
507
|
+
- (void)groupCall:(NSString *)groupId userIdList:(NSArray<NSString *> *)userIdList callMediaType:(TUICallMediaType)callMediaType params:(TUICallParams *)params succ:(TUICallSucc __nullable)succ fail:(TUICallFail __nullable)fail;
|
|
508
|
+
```
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
【Swift】
|
|
512
|
+
``` swift
|
|
513
|
+
public func groupCall(groupId: String, userIdList: [String], callMediaType: TUICallMediaType, params: TUICallParams, succ: @escaping TUICallSucc, fail: @escaping TUICallFail)
|
|
514
|
+
```
|
|
515
|
+
<table>
|
|
516
|
+
<tr>
|
|
517
|
+
<td rowspan="1" colSpan="1" >参数</td>
|
|
518
|
+
|
|
519
|
+
<td rowspan="1" colSpan="1" >类型</td>
|
|
520
|
+
|
|
521
|
+
<td rowspan="1" colSpan="1" >含义</td>
|
|
522
|
+
</tr>
|
|
523
|
+
|
|
524
|
+
<tr>
|
|
525
|
+
<td rowspan="1" colSpan="1" >groupId</td>
|
|
526
|
+
|
|
527
|
+
<td rowspan="1" colSpan="1" >NSString</td>
|
|
528
|
+
|
|
529
|
+
<td rowspan="1" colSpan="1" >此次群组通话的群 ID</td>
|
|
530
|
+
</tr>
|
|
531
|
+
|
|
532
|
+
<tr>
|
|
533
|
+
<td rowspan="1" colSpan="1" >userIdList</td>
|
|
534
|
+
|
|
535
|
+
<td rowspan="1" colSpan="1" >NSArray</td>
|
|
536
|
+
|
|
537
|
+
<td rowspan="1" colSpan="1" >目标用户的 userId 列表</td>
|
|
538
|
+
</tr>
|
|
539
|
+
|
|
540
|
+
<tr>
|
|
541
|
+
<td rowspan="1" colSpan="1" >callMediaType</td>
|
|
542
|
+
|
|
543
|
+
<td rowspan="1" colSpan="1" >[TUICallMediaType](https://cloud.tencent.com/document/product/647/90446#MediaType)</td>
|
|
544
|
+
|
|
545
|
+
<td rowspan="1" colSpan="1" >通话的媒体类型,比如视频通话、语音通话</td>
|
|
546
|
+
</tr>
|
|
547
|
+
|
|
548
|
+
<tr>
|
|
549
|
+
<td rowspan="1" colSpan="1" >params</td>
|
|
550
|
+
|
|
551
|
+
<td rowspan="1" colSpan="1" >[TUICallParams](https://cloud.tencent.com/document/product/647/90446#CallParams)</td>
|
|
552
|
+
|
|
553
|
+
<td rowspan="1" colSpan="1" >通话扩展参数,例如:房间号、通话邀请超时时间,离线推送自定义内容等</td>
|
|
554
|
+
</tr>
|
|
555
|
+
|
|
556
|
+
<tr>
|
|
557
|
+
<td rowspan="1" colSpan="1" >succ</td>
|
|
558
|
+
|
|
559
|
+
<td rowspan="1" colSpan="1" >TUICallSucc</td>
|
|
560
|
+
|
|
561
|
+
<td rowspan="1" colSpan="1" >成功回调</td>
|
|
562
|
+
</tr>
|
|
563
|
+
|
|
564
|
+
<tr>
|
|
565
|
+
<td rowspan="1" colSpan="1" >fail</td>
|
|
566
|
+
|
|
567
|
+
<td rowspan="1" colSpan="1" >TUICallFail</td>
|
|
568
|
+
|
|
569
|
+
<td rowspan="1" colSpan="1" >失败回调</td>
|
|
570
|
+
</tr>
|
|
571
|
+
</table>
|
|
572
|
+
|
|
573
|
+
|
|
574
|
+
### joinInGroupCall
|
|
575
|
+
|
|
576
|
+
|
|
577
|
+
|
|
578
|
+
加入群组中已有的音视频通话。**注意:建议使用 join 接口。**
|
|
579
|
+
|
|
580
|
+
> **注意:**
|
|
581
|
+
>
|
|
582
|
+
|
|
583
|
+
> 加入群组中已有的音视频通话前,需要提前创建或加入 IM 群组,并且群组中已有用户在通话中,如果已经创建,请忽略。
|
|
584
|
+
>
|
|
585
|
+
|
|
586
|
+
> 群组的创建详见:[IM 群组管理](https://cloud.tencent.com/document/product/269/75394#.E5.88.9B.E5.BB.BA.E7.BE.A4.E7.BB.84) ,或者您也可以直接使用 [IM TUIKit](https://cloud.tencent.com/document/product/269/37059),一站式集成聊天、通话等场景。
|
|
587
|
+
>
|
|
588
|
+
|
|
589
|
+
|
|
590
|
+
|
|
591
|
+
|
|
592
|
+
|
|
593
|
+
【Objective-C】
|
|
594
|
+
``` objectivec
|
|
595
|
+
- (void)joinInGroupCall:(TUIRoomId *)roomId groupId:(NSString *)groupId callMediaType:(TUICallMediaType)callMediaType;
|
|
596
|
+
```
|
|
597
|
+
|
|
598
|
+
|
|
599
|
+
【Swift】
|
|
600
|
+
``` swift
|
|
601
|
+
public func joinInGroupCall(roomId: TUIRoomId, groupId: String, callMediaType: TUICallMediaType)
|
|
602
|
+
```
|
|
603
|
+
<table>
|
|
604
|
+
<tr>
|
|
605
|
+
<td rowspan="1" colSpan="1" >参数</td>
|
|
606
|
+
|
|
607
|
+
<td rowspan="1" colSpan="1" >类型</td>
|
|
608
|
+
|
|
609
|
+
<td rowspan="1" colSpan="1" >含义</td>
|
|
610
|
+
</tr>
|
|
611
|
+
|
|
612
|
+
<tr>
|
|
613
|
+
<td rowspan="1" colSpan="1" >roomId</td>
|
|
614
|
+
|
|
615
|
+
<td rowspan="1" colSpan="1" >[TUIRoomId](https://cloud.tencent.com/document/product/647/90446#RoomId)</td>
|
|
616
|
+
|
|
617
|
+
<td rowspan="1" colSpan="1" >此次通话的音视频房间 ID</td>
|
|
618
|
+
</tr>
|
|
619
|
+
|
|
620
|
+
<tr>
|
|
621
|
+
<td rowspan="1" colSpan="1" >groupId</td>
|
|
622
|
+
|
|
623
|
+
<td rowspan="1" colSpan="1" >NSString</td>
|
|
624
|
+
|
|
625
|
+
<td rowspan="1" colSpan="1" >此次群组通话的群 ID</td>
|
|
626
|
+
</tr>
|
|
627
|
+
|
|
628
|
+
<tr>
|
|
629
|
+
<td rowspan="1" colSpan="1" >callMediaType</td>
|
|
630
|
+
|
|
631
|
+
<td rowspan="1" colSpan="1" >[TUICallMediaType](https://cloud.tencent.com/document/product/647/90446#MediaType)</td>
|
|
632
|
+
|
|
633
|
+
<td rowspan="1" colSpan="1" >通话的媒体类型,比如视频通话、语音通话</td>
|
|
634
|
+
</tr>
|
|
635
|
+
</table>
|