@tencentcloud/sdk-mcp 1.1.6 → 1.1.8

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 (33) hide show
  1. package/package.json +1 -1
  2. package/resource/doc/chatuikit/react/chat_window_integration.md +20 -16
  3. package/resource/doc/chatuikit/react/integration.md +22 -13
  4. package/resource/doc/chatuikit/vue/integration.md +3 -3
  5. package/resource/doc/tuicallkit/react/{api_TUICallKit.md → api.md} +52 -465
  6. package/resource/doc/tuicallkit/react/integration.md +86 -0
  7. package/resource/doc/tuicallkit/vue/{api_TUICallKit.md → api.md} +52 -468
  8. package/resource/doc/tuicallkit/vue/integration.md +83 -0
  9. package/tools/call/get-web-call-api.js +30 -0
  10. package/tools/call/get-web-call-api.js.map +1 -0
  11. package/tools/call/get-web-call-integration.js +8 -10
  12. package/tools/call/get-web-call-integration.js.map +1 -1
  13. package/tools/chat/get-web-chat-component-detail.js +2 -1
  14. package/tools/chat/get-web-chat-component-detail.js.map +1 -1
  15. package/tools/common/get-official-experience-account.js +52 -0
  16. package/tools/common/get-official-experience-account.js.map +1 -0
  17. package/tools/common/get-usersig.js +2 -2
  18. package/tools/index.js +4 -0
  19. package/tools/index.js.map +1 -1
  20. package/resource/doc/tuicallkit/react/.gitkeep +0 -0
  21. package/resource/doc/tuicallkit/react/how_to_integrated_react_callkit.md +0 -195
  22. package/resource/doc/tuicallkit/react/how_to_run_react_callkit_demo.md +0 -93
  23. package/resource/doc/tuicallkit/vue/.gitkeep +0 -0
  24. package/resource/doc/tuicallkit/vue/how_to_integrated_vue_callkit.md +0 -418
  25. package/resource/doc/tuicallkit/vue/how_to_run_vue_callkit_demo.md +0 -96
  26. /package/resource/doc/chatuikit/{ios → iOS}/client_api_iOS.md +0 -0
  27. /package/resource/doc/chatuikit/{ios → iOS}/integrate_tuichat_only_iOS.md +0 -0
  28. /package/resource/doc/chatuikit/{ios → iOS}/integrate_tuikit_iOS.md +0 -0
  29. /package/resource/doc/chatuikit/{ios → iOS}/ui_api_iOS.md +0 -0
  30. /package/resource/doc/tuicallkit/{ios → iOS}/api_TUICallKit.md +0 -0
  31. /package/resource/doc/tuicallkit/{ios → iOS}/api_TUICallObserver.md +0 -0
  32. /package/resource/doc/tuicallkit/{ios → iOS}/how_to_integrated_iOS_callkit.md +0 -0
  33. /package/resource/doc/tuicallkit/{ios → iOS}/how_to_run_iOS_callkit_demo.md +0 -0
@@ -2,8 +2,7 @@ TUICallKit 是音视频通话组件的**含 UI 接口**,使用 TUICallKit API
2
2
 
3
3
  > **说明:**
4
4
  >
5
- > - 为提供更优质的音视频通信能力, TUICallKit npm 包 [@tencentcloud/call-uikit-react](https://www.npmjs.com/package/@tencentcloud/call-uikit-react)、[@tencentcloud/call-uikit-vue](https://www.npmjs.com/package/@tencentcloud/call-uikit-vue)、[@tencentcloud/call-uikit-vue2](https://www.npmjs.com/package/@tencentcloud/call-uikit-vue2)、[@tencentcloud/call-uikit-vue2.6](https://www.npmjs.com/package/@tencentcloud/call-uikit-vue2.6) 在 4.0.0 版本进行了重大升级。
6
- > - v4.0.0+ 对接口进行了优化调整,废弃了部分接口,同步提供更简洁、稳定的新接口方案。
5
+ > - 为提供更优质的音视频通信能力, TUICallKit npm 包 [@trtc/calls-uikit-react](https://www.npmjs.com/package/@trtc/calls-uikit-react)、[@trtc/calls-uikit-vue](https://www.npmjs.com/package/@trtc/calls-uikit-vue)、[@trtc/calls-uikit-vue2](https://www.npmjs.com/package/@trtc/calls-uikit-vue2)、[@trtc/calls-uikit-vue2.6](https://www.npmjs.com/package/@trtc/calls-uikit-vue2.6) 在 4.0.0 版本进行了重大升级。
7
6
 
8
7
 
9
8
  ## API 概览
@@ -291,7 +290,7 @@ TUICallKit 是音视频通话组件的**含 UI 接口**,使用 TUICallKit API
291
290
 
292
291
  【React】
293
292
  ``` bash
294
- import { TUICallKit, VideoDisplayMode, VideoResolution } from "@tencentcloud/call-uikit-react";
293
+ import { TUICallKit, VideoDisplayMode, VideoResolution } from "@trtc/calls-uikit-react";
295
294
 
296
295
  <TUICallKit
297
296
  videoDisplayMode={VideoDisplayMode.CONTAIN}
@@ -326,7 +325,7 @@ function handleAfterCalling() {
326
325
  </template>
327
326
 
328
327
  <script lang="ts" setup>
329
- import { TUICallKit, TUICallKitServer, VideoDisplayMode, VideoResolution, STATUS } from "@tencentcloud/call-uikit-vue";
328
+ import { TUICallKit, TUICallKitAPI, VideoDisplayMode, VideoResolution, STATUS } from "@trtc/calls-uikit-vue";
330
329
 
331
330
  function beforeCalling(type: string, error: any) {
332
331
  console.log("[TUICallkit Demo] beforeCalling:", type, error);
@@ -368,7 +367,7 @@ function statusChanged(args: { oldStatus: string; newStatus: string; }) {
368
367
  </template>
369
368
 
370
369
  <script lang="ts" setup>
371
- import { TUICallKit, TUICallKitServer, VideoDisplayMode, VideoResolution, STATUS } from "@tencentcloud/call-uikit-vue2";
370
+ import { TUICallKit, TUICallKitAPI, VideoDisplayMode, VideoResolution, STATUS } from "@trtc/calls-uikit-vue2";
372
371
 
373
372
  function beforeCalling(type: string, error: any) {
374
373
  console.log("[TUICallkit Demo] beforeCalling:", type, error);
@@ -409,7 +408,7 @@ function statusChanged(args: { oldStatus: string; newStatus: string; }) {
409
408
  </template>
410
409
 
411
410
  <script lang="ts" setup>
412
- import { TUICallKit, TUICallKitServer, VideoDisplayMode, VideoResolution, STATUS } from "@tencentcloud/call-uikit-vue2.6";
411
+ import { TUICallKit, TUICallKitAPI, VideoDisplayMode, VideoResolution, STATUS } from "@trtc/calls-uikit-vue2.6";
413
412
 
414
413
  function beforeCalling(type: string, error: any) {
415
414
  console.log("[TUICallkit Demo] beforeCalling:", type, error);
@@ -432,32 +431,32 @@ function statusChanged(args: { oldStatus: string; newStatus: string; }) {
432
431
  </script>
433
432
  ```
434
433
 
435
- ## TUICallKitServer API 详情
434
+ ## TUICallKitAPI API 详情
436
435
 
437
436
 
438
437
 
439
438
 
440
439
  【React】
441
440
  ``` javascript
442
- import { TUICallKitServer } from "@tencentcloud/call-uikit-react";
441
+ import { TUICallKitAPI } from "@trtc/calls-uikit-react";
443
442
  ```
444
443
 
445
444
 
446
445
  【Vue3】
447
446
  ``` javascript
448
- import { TUICallKitServer } from "@tencentcloud/call-uikit-vue";
447
+ import { TUICallKitAPI } from "@trtc/calls-uikit-vue";
449
448
  ```
450
449
 
451
450
 
452
451
  【Vue2.7】
453
452
  ``` javascript
454
- import { TUICallKitServer } from "@tencentcloud/call-uikit-vue2";
453
+ import { TUICallKitAPI } from "@trtc/calls-uikit-vue2";
455
454
  ```
456
455
 
457
456
 
458
457
  【Vue2.6】
459
458
  ``` javascript
460
- import { TUICallKitServer } from "@tencentcloud/call-uikit-vue2.6";
459
+ import { TUICallKitAPI } from "@trtc/calls-uikit-vue2.6";
461
460
  ```
462
461
 
463
462
  ### init
@@ -465,9 +464,9 @@ import { TUICallKitServer } from "@tencentcloud/call-uikit-vue2.6";
465
464
  初始化 TUICallKit。
466
465
  ``` javascript
467
466
  try {
468
- await TUICallKitServer.init({ SDKAppID, userID, userSig });
467
+ await TUICallKitAPI.init({ SDKAppID, userID, userSig });
469
468
  // If you already have a tim instance in your project, you need to pass it in here.
470
- // await TUICallKitServer.init({ tim, SDKAppID, userID, userSig});
469
+ // await TUICallKitAPI.init({ tim, SDKAppID, userID, userSig});
471
470
  console.log("[TUICallKit] init succeeds.");
472
471
  } catch (error: any) {
473
472
  console.error(`[TUICallKit] init failed. Reason: ${error}`);
@@ -531,18 +530,11 @@ try {
531
530
  ### calls
532
531
 
533
532
  发起单人或多人通话。
534
-
535
- > **说明:**
536
- >
537
-
538
- > **v4.0.0+ 支持。**
539
- >
540
-
541
533
  ``` javascript
542
534
  try {
543
- await TUICallKitServer.calls({
535
+ await TUICallKitAPI.calls({
544
536
  userIDList: ['jack', 'tom'],
545
- type: TUICallType.VIDEO_CALL
537
+ type: CallMediaType.VIDEO_CALL
546
538
  });
547
539
  } catch (error: any) {
548
540
  console.error(`[TUICallKit] Failed to call the groupCall API. Reason:${error}`);
@@ -574,11 +566,11 @@ try {
574
566
  <tr>
575
567
  <td rowspan="1" colSpan="1" >type</td>
576
568
 
577
- <td rowspan="1" colSpan="1" >[TUICallType](https://cloud.tencent.com/document/product/647/81015#TUICallType)</td>
569
+ <td rowspan="1" colSpan="1" >[CallMediaType](https://cloud.tencent.com/document/product/647/81015#TUICallType)</td>
578
570
 
579
571
  <td rowspan="1" colSpan="1" >是</td>
580
572
 
581
- <td rowspan="1" colSpan="1" >通话的媒体类型,参数值说明参见 [TUICallType 通话类型](https://cloud.tencent.com/document/product/647/81015#TUICallType)<br>兼容旧版本:语音通话(type = 1)、视频通话(type = 2)</td>
573
+ <td rowspan="1" colSpan="1" >通话的媒体类型,参数值说明参见 [CallMediaType 通话类型](https://cloud.tencent.com/document/product/647/81015#TUICallType)<br>兼容旧版本:语音通话(type = 1)、视频通话(type = 2)</td>
582
574
  </tr>
583
575
 
584
576
  <tr>
@@ -646,16 +638,9 @@ try {
646
638
  ### join
647
639
 
648
640
  加入群组中已有的音视频通话。
649
-
650
- > **说明:**
651
- >
652
-
653
- > **v4.0.0+ 支持。**
654
- >
655
-
656
641
  ``` javascript
657
642
  try {
658
- await TUICallKitServer.join({callId: xx});
643
+ await TUICallKitAPI.join({callId: xx});
659
644
  } catch (error: any) {
660
645
  console.error(`[TUICallKit] Failed to call the join API. Reason: ${error}`);
661
646
  }
@@ -689,7 +674,7 @@ try {
689
674
 
690
675
  设置语言,目前支持:中文、英文、日文。
691
676
  ``` javascript
692
- TUICallKitServer.setLanguage("zh-cn"); // "en" | "zh-cn" | "ja_JP"
677
+ TUICallKitAPI.setLanguage("zh-cn"); // "en" | "zh-cn" | "ja_JP"
693
678
  ```
694
679
 
695
680
  参数如下表所示:
@@ -723,12 +708,12 @@ TUICallKitServer.setLanguage("zh-cn"); // "en" | "zh-cn" | "ja_JP"
723
708
  > **注意:**
724
709
  >
725
710
 
726
- > **v2.2.0+ 支持**。**通话中使用该接口修改用户信息,UI 不会立即更新,需要等到下次通话才能看到变化**。
711
+ > **通话中使用该接口修改用户信息,UI 不会立即更新,需要等到下次通话才能看到变化**。
727
712
  >
728
713
 
729
714
  ``` javascript
730
715
  try {
731
- await TUICallKitServer.setSelfInfo({ nickName: "xxx", avatar: "http://xxx" });
716
+ await TUICallKitAPI.setSelfInfo({ nickName: "xxx", avatar: "http://xxx" });
732
717
  } catch (error: any) {
733
718
  console.error(`[TUICallKit] Failed to call the setSelfInfo API. Reason: ${error}`;
734
719
  }
@@ -779,7 +764,7 @@ try {
779
764
 
780
765
  ``` javascript
781
766
  try {
782
- await TUICallKitServer.setCallingBell(filePath?: string)
767
+ await TUICallKitAPI.setCallingBell(filePath?: string)
783
768
  } catch (error: any) {
784
769
  console.error(`[TUICallKit] Failed to call the setCallingBell API. Reason: ${error}`);
785
770
  }
@@ -815,7 +800,7 @@ try {
815
800
  开启/关闭悬浮窗功能。默认为 false,通话界面左上角的悬浮窗按钮隐藏,设置为 true 后显示。
816
801
  ``` javascript
817
802
  try {
818
- await TUICallKitServer.enableFloatWindow(enable: Boolean)
803
+ await TUICallKitAPI.enableFloatWindow(enable: Boolean)
819
804
  } catch (error: any) {
820
805
  console.error(`[TUICallKit] Failed to call the enableFloatWindow API. Reason: ${error}`);
821
806
  }
@@ -826,7 +811,7 @@ try {
826
811
  开启/关闭来电铃声。开启后,收到通话请求时,不会播放来电铃声。
827
812
  ``` javascript
828
813
  try {
829
- await TUICallKitServer.enableMuteMode(enable: boolean)
814
+ await TUICallKitAPI.enableMuteMode(enable: boolean)
830
815
  } catch (error: any) {
831
816
  console.error(`[TUICallKit] Failed to call the enableMuteMode API. Reason: ${error}`);
832
817
  }
@@ -859,17 +844,10 @@ try {
859
844
  ### enableVirtualBackground
860
845
 
861
846
  开启/关闭模糊背景功能。如果想设置图片背景模糊参见 [Web](https://cloud.tencent.com/document/product/647/106071)。通过调用接口,您可以在 UI 上显示模糊背景的功能按钮,点击按钮可直接启用模糊背景功能。
862
-
863
- > **注意:**
864
- >
865
-
866
- > **v3.2.4+ 支持。**
867
- >
868
-
869
847
  ``` javascript
870
- import { TUICallKitServer } from "@tencentcloud/call-uikit-react";
848
+ import { TUICallKitAPI } from "@trtc/calls-uikit-react";
871
849
  const enable = true;
872
- TUICallKitServer.enableVirtualBackground(enable);
850
+ TUICallKitAPI.enableVirtualBackground(enable);
873
851
  ```
874
852
 
875
853
  参数列表:
@@ -903,7 +881,7 @@ TUICallKitServer.enableVirtualBackground(enable);
903
881
  该方法不会自动退出`tim`,需要手动退出`tim.logout();`。
904
882
  ``` javascript
905
883
  try {
906
- await TUICallKitServer.destroyed();
884
+ await TUICallKitAPI.destroyed();
907
885
  } catch (error: any) {
908
886
  alert(`[TUICallKit] Failed to call the destroyed API. Reason: ${error}`);
909
887
  }
@@ -913,29 +891,22 @@ try {
913
891
 
914
892
  隐藏功能按钮,目前仅支持 摄像头,麦克风和切换前后置按钮。
915
893
 
916
- > **注意:**
917
- >
918
-
919
- > **v3.2.9+ 支持。**
920
- >
921
-
922
-
923
894
 
924
895
 
925
896
 
926
897
  【Vue】
927
898
  ``` javascript
928
- import { TUICallKitServer, FeatureButton } from "@tencentcloud/call-uikit-vue";
899
+ import { TUICallKitAPI, FeatureButton } from "@trtc/calls-uikit-vue";
929
900
 
930
- TUICallKitServer.hideFeatureButton(FeatureButton.Camera);
901
+ TUICallKitAPI.hideFeatureButton(FeatureButton.Camera);
931
902
  ```
932
903
 
933
904
 
934
905
  【React】
935
906
  ``` javascript
936
- import { TUICallKitServer, FeatureButton } from "@tencentcloud/call-uikit-react";
907
+ import { TUICallKitAPI, FeatureButton } from "@trtc/calls-uikit-react";
937
908
 
938
- TUICallKitServer.hideFeatureButton(FeatureButton.Camera);
909
+ TUICallKitAPI.hideFeatureButton(FeatureButton.Camera);
939
910
  ```
940
911
 
941
912
  参数列表:
@@ -965,15 +936,8 @@ TUICallKitServer.hideFeatureButton(FeatureButton.Camera);
965
936
  ### setLocalViewBackgroundImage
966
937
 
967
938
  设置本地用户通话背景。
968
-
969
- > **注意:**
970
- >
971
-
972
- > **v3.2.9+ 支持。**
973
- >
974
-
975
939
  ``` typescript
976
- TUICallKitServer.setLocalViewBackgroundImage('http://xxx.png');
940
+ TUICallKitAPI.setLocalViewBackgroundImage('http://xxx.png');
977
941
  ```
978
942
 
979
943
  参数列表:
@@ -1003,17 +967,10 @@ TUICallKitServer.setLocalViewBackgroundImage('http://xxx.png');
1003
967
  ### setRemoteViewBackgroundImage
1004
968
 
1005
969
  设置远端用户通话背景。
1006
-
1007
- > **注意:**
1008
- >
1009
-
1010
- > **v3.2.9+ 支持。**
1011
- >
1012
-
1013
970
  ``` javascript
1014
971
  const userId = 'xxx';
1015
972
  const url = 'http://xxx.png';
1016
- TUICallKitServer.setRemoteViewBackgroundImage(userId, url);
973
+ TUICallKitAPI.setRemoteViewBackgroundImage(userId, url);
1017
974
  ```
1018
975
 
1019
976
  参数列表:
@@ -1054,27 +1011,20 @@ TUICallKitServer.setRemoteViewBackgroundImage(userId, url);
1054
1011
 
1055
1012
  设置通话界面布局模式。
1056
1013
 
1057
- > **注意:**
1058
- >
1059
-
1060
- > **v3.3.0+ 支持。**
1061
- >
1062
-
1063
-
1064
1014
 
1065
1015
 
1066
1016
 
1067
1017
  【Vue】
1068
1018
  ``` javascript
1069
- import { TUICallKitServer, LayoutMode } from "@tencentcloud/call-uikit-vue";
1070
- TUICallKitServer.setLayoutMode(LayoutMode.LocalInLargeView);
1019
+ import { TUICallKitAPI, LayoutMode } from "@trtc/calls-uikit-vue";
1020
+ TUICallKitAPI.setLayoutMode(LayoutMode.LocalInLargeView);
1071
1021
  ```
1072
1022
 
1073
1023
 
1074
1024
  【React】
1075
1025
  ``` javascript
1076
- import { TUICallKitServer, LayoutMode } from "@tencentcloud/call-uikit-react";
1077
- TUICallKitServer.setLayoutMode(LayoutMode.LocalInLargeView);
1026
+ import { TUICallKitAPI, LayoutMode } from "@trtc/calls-uikit-react";
1027
+ TUICallKitAPI.setLayoutMode(LayoutMode.LocalInLargeView);
1078
1028
  ```
1079
1029
 
1080
1030
  参数列表:
@@ -1104,15 +1054,8 @@ TUICallKitServer.setLayoutMode(LayoutMode.LocalInLargeView);
1104
1054
  ### setCameraDefaultState
1105
1055
 
1106
1056
  设置摄像头是否默认打开。
1107
-
1108
- > **注意:**
1109
- >
1110
-
1111
- > **v3.3.0+ 支持。**
1112
- >
1113
-
1114
1057
  ``` javascript
1115
- TUICallKitServer.setCameraDefaultState(true);
1058
+ TUICallKitAPI.setCameraDefaultState(true);
1116
1059
  ```
1117
1060
 
1118
1061
  参数列表:
@@ -1142,15 +1085,8 @@ TUICallKitServer.setCameraDefaultState(true);
1142
1085
  ### getTUICallEngineInstance
1143
1086
 
1144
1087
  获取 TUICallEngine 实例。
1145
-
1146
- > **注意:**
1147
- >
1148
-
1149
- > v2.4.3+ 支持。
1150
- >
1151
-
1152
1088
  ``` javascript
1153
- TUICallKitServer.getTUICallEngineInstance();
1089
+ TUICallKitAPI.getTUICallEngineInstance();
1154
1090
  ```
1155
1091
 
1156
1092
  ## TUICallKit 类型定义
@@ -1252,7 +1188,7 @@ TUICallKitServer.getTUICallEngineInstance();
1252
1188
 
1253
1189
  **常见问题:**
1254
1190
 
1255
- - iOS 13&14不支持编码高于 720P 的视频,建议在这两个系统版本限制最高采集 720P。参见 [iOS Safari 已知问题 case 12](https://web.sdk.qcloud.com/trtc/webrtc/doc/zh-cn/tutorial-02-info-webrtc-issues.html#h2-4)。
1191
+ - iOS 13&14不支持编码高于 720p 的视频,建议在这两个系统版本限制最高采集 720P。参见 [iOS Safari 已知问题 case 12](https://web.sdk.qcloud.com/trtc/webrtc/doc/zh-cn/tutorial-02-info-webrtc-issues.html#h2-4)。
1256
1192
 
1257
1193
  - Firefox 不支持自定义视频帧率(默认为 30fps)。
1258
1194
 
@@ -1317,22 +1253,22 @@ TUICallKitServer.getTUICallEngineInstance();
1317
1253
  </table>
1318
1254
 
1319
1255
 
1320
- ### **TUICallType**
1256
+ ### **CallMediaType**
1321
1257
  <table>
1322
1258
  <tr>
1323
- <td rowspan="1" colSpan="1" >TUICallType 类型</td>
1259
+ <td rowspan="1" colSpan="1" >CallMediaType 类型</td>
1324
1260
 
1325
1261
  <td rowspan="1" colSpan="1" >描述</td>
1326
1262
  </tr>
1327
1263
 
1328
1264
  <tr>
1329
- <td rowspan="1" colSpan="1" >TUICallType.AUDIO_CALL </td>
1265
+ <td rowspan="1" colSpan="1" >CallMediaType.AUDIO</td>
1330
1266
 
1331
1267
  <td rowspan="1" colSpan="1" >语音通话</td>
1332
1268
  </tr>
1333
1269
 
1334
1270
  <tr>
1335
- <td rowspan="1" colSpan="1" >TUICallType.VIDEO_CALL </td>
1271
+ <td rowspan="1" colSpan="1" >CallMediaType.VIDEO</td>
1336
1272
 
1337
1273
  <td rowspan="1" colSpan="1" >视频通话</td>
1338
1274
  </tr>
@@ -1398,7 +1334,7 @@ TUICallKitServer.getTUICallEngineInstance();
1398
1334
 
1399
1335
  <td rowspan="1" colSpan="1" >否</td>
1400
1336
 
1401
- <td rowspan="1" colSpan="1" >离线推送忽略 badge 计数(仅对 iOS 生效), 如果设置为 true,在 iOS 接收端,这条消息不会使 APP 的应用图标未读计数增加<br>**v3.3.0+ 支持**</td>
1337
+ <td rowspan="1" colSpan="1" >离线推送忽略 badge 计数(仅对 iOS 生效), 如果设置为 true,在 iOS 接收端,这条消息不会使 App 的应用图标未读计数增加。</td>
1402
1338
  </tr>
1403
1339
 
1404
1340
  <tr>
@@ -1408,7 +1344,7 @@ TUICallKitServer.getTUICallEngineInstance();
1408
1344
 
1409
1345
  <td rowspan="1" colSpan="1" >否</td>
1410
1346
 
1411
- <td rowspan="1" colSpan="1" >离线推送声音设置(仅对 iOS 生效)。**v3.3.0+ 支持**</td>
1347
+ <td rowspan="1" colSpan="1" >离线推送声音设置(仅对 iOS 生效)。</td>
1412
1348
  </tr>
1413
1349
 
1414
1350
  <tr>
@@ -1418,7 +1354,7 @@ TUICallKitServer.getTUICallEngineInstance();
1418
1354
 
1419
1355
  <td rowspan="1" colSpan="1" >否</td>
1420
1356
 
1421
- <td rowspan="1" colSpan="1" >离线推送声音设置(仅对 Android 生效)。**v3.3.0+ 支持**</td>
1357
+ <td rowspan="1" colSpan="1" >离线推送声音设置(仅对 Android 生效)。</td>
1422
1358
  </tr>
1423
1359
 
1424
1360
  <tr>
@@ -1428,7 +1364,7 @@ TUICallKitServer.getTUICallEngineInstance();
1428
1364
 
1429
1365
  <td rowspan="1" colSpan="1" >否</td>
1430
1366
 
1431
- <td rowspan="1" colSpan="1" >VIVO 推送消息分类。**v3.3.0+ 支持**</td>
1367
+ <td rowspan="1" colSpan="1" >VIVO 推送消息分类。</td>
1432
1368
  </tr>
1433
1369
 
1434
1370
  <tr>
@@ -1438,7 +1374,7 @@ TUICallKitServer.getTUICallEngineInstance();
1438
1374
 
1439
1375
  <td rowspan="1" colSpan="1" >否</td>
1440
1376
 
1441
- <td rowspan="1" colSpan="1" >小米手机 8.0 系统及以上的渠道 ID。**v3.3.0+ 支持**</td>
1377
+ <td rowspan="1" colSpan="1" >小米手机 8.0 系统及以上的渠道 ID。</td>
1442
1378
  </tr>
1443
1379
 
1444
1380
  <tr>
@@ -1448,7 +1384,7 @@ TUICallKitServer.getTUICallEngineInstance();
1448
1384
 
1449
1385
  <td rowspan="1" colSpan="1" >否</td>
1450
1386
 
1451
- <td rowspan="1" colSpan="1" >FCM 通道手机 8.0 系统及以上的渠道 ID。**v3.3.0+ 支持**</td>
1387
+ <td rowspan="1" colSpan="1" >FCM 通道手机 8.0 系统及以上的渠道 ID。</td>
1452
1388
  </tr>
1453
1389
 
1454
1390
  <tr>
@@ -1458,7 +1394,7 @@ TUICallKitServer.getTUICallEngineInstance();
1458
1394
 
1459
1395
  <td rowspan="1" colSpan="1" >否</td>
1460
1396
 
1461
- <td rowspan="1" colSpan="1" >华为推送消息分类。**v3.3.0+ 支持**</td>
1397
+ <td rowspan="1" colSpan="1" >华为推送消息分类。</td>
1462
1398
  </tr>
1463
1399
 
1464
1400
  <tr>
@@ -1468,7 +1404,7 @@ TUICallKitServer.getTUICallEngineInstance();
1468
1404
 
1469
1405
  <td rowspan="1" colSpan="1" >否</td>
1470
1406
 
1471
- <td rowspan="1" colSpan="1" >是否关闭推送(默认开启推送)。**v3.3.0+ 支持**</td>
1407
+ <td rowspan="1" colSpan="1" >是否关闭推送(默认开启推送)。</td>
1472
1408
  </tr>
1473
1409
 
1474
1410
  <tr>
@@ -1478,7 +1414,7 @@ TUICallKitServer.getTUICallEngineInstance();
1478
1414
 
1479
1415
  <td rowspan="1" colSpan="1" >否</td>
1480
1416
 
1481
- <td rowspan="1" colSpan="1" >iOS 离线推送类型。0-普通推送;1-VoIP推送。默认:0。**v3.3.0+ 支持**</td>
1417
+ <td rowspan="1" colSpan="1" >iOS 离线推送类型。0-普通推送;1-VoIP推送。默认:0。</td>
1482
1418
  </tr>
1483
1419
  </table>
1484
1420
 
@@ -1558,352 +1494,3 @@ offlinePushInfo.extension = JSON.stringify(extension);
1558
1494
  <td rowspan="1" colSpan="1" >远端用户在大窗显示</td>
1559
1495
  </tr>
1560
1496
  </table>
1561
-
1562
-
1563
- # 废弃接口
1564
-
1565
- ### <TUICallKitMini/>
1566
-
1567
- `<TUICallKitMini/>`:TUICallKit UI 通话悬浮窗,当`<TUICallKit :allowedMinimized="true"/>`时,`<TUICallKitMini/>`必须被放置在页面中。
1568
-
1569
- > **说明:**
1570
- >
1571
- > - `<TUICallKitMini/>`UI 通话悬浮窗,**≥ v2.3.2 废弃,不再提供该组件**。
1572
- > - 由`<TUICallKit/>` UI 通话组件主体,实现悬浮窗样式,减少使用复杂度。
1573
-
1574
- <table>
1575
- <tr>
1576
- <td rowspan="1" colSpan="1" >属性</td>
1577
-
1578
- <td rowspan="1" colSpan="1" >描述</td>
1579
-
1580
- <td rowspan="1" colSpan="1" >类型</td>
1581
-
1582
- <td rowspan="1" colSpan="1" >是否必填</td>
1583
-
1584
- <td rowspan="1" colSpan="1" >默认值</td>
1585
-
1586
- <td rowspan="1" colSpan="1" >支持 vue</td>
1587
-
1588
- <td rowspan="1" colSpan="1" >支持 react</td>
1589
- </tr>
1590
-
1591
- <tr>
1592
- <td rowspan="1" colSpan="1" ><br>@kicked-out</td>
1593
-
1594
- <td rowspan="1" colSpan="1" >**注意:**<br>**≥ v2.3.2 废弃**<br><br>组件抛出的事件,当前登录用户被踢出登录时会触发该事件,通话也会自动结束</td>
1595
-
1596
- <td rowspan="1" colSpan="1" >function()</td>
1597
-
1598
- <td rowspan="1" colSpan="1" >否</td>
1599
-
1600
- <td rowspan="1" colSpan="1" >-</td>
1601
-
1602
- <td rowspan="1" colSpan="1" >√</td>
1603
-
1604
- <td rowspan="1" colSpan="1" >×</td>
1605
- </tr>
1606
-
1607
- <tr>
1608
- <td rowspan="1" colSpan="1" ><br>@status-changed</td>
1609
-
1610
- <td rowspan="1" colSpan="1" >**注意:**<br>**≥ v2.3.2 废弃**<br><br>组件抛出的事件,当通话状态发生变化时,会触发该事件,通话状态种类详见,[STATUS 值说明](https://cloud.tencent.com/document/product/647/81015#STATUS)</td>
1611
-
1612
- <td rowspan="1" colSpan="1" >function({oldStatus, newStatus})</td>
1613
-
1614
- <td rowspan="1" colSpan="1" >否</td>
1615
-
1616
- <td rowspan="1" colSpan="1" >-</td>
1617
-
1618
- <td rowspan="1" colSpan="1" >√</td>
1619
-
1620
- <td rowspan="1" colSpan="1" >×</td>
1621
- </tr>
1622
- </table>
1623
-
1624
-
1625
- ### call
1626
-
1627
-
1628
-
1629
- 拨打 1v1 通话,**建议使用 calls 接口。**
1630
- ``` javascript
1631
- import { TUICallKitServer, TUICallType } from '@tencentcloud/call-uikit-react';
1632
- try {
1633
- await TUICallKitServer.call({
1634
- userID: 'mike', // username being called
1635
- type: TUICallType.VIDEO_CALL,
1636
- });
1637
- } catch (error: any) {
1638
- console.error(`[TUICallKit] Call failed. Reason: ${error}`);
1639
- }
1640
- ```
1641
-
1642
- 参数如下表所示:
1643
- <table>
1644
- <tr>
1645
- <td rowspan="1" colSpan="1" >参数</td>
1646
-
1647
- <td rowspan="1" colSpan="1" >类型</td>
1648
-
1649
- <td rowspan="1" colSpan="1" >是否必填</td>
1650
-
1651
- <td rowspan="1" colSpan="1" >含义</td>
1652
- </tr>
1653
-
1654
- <tr>
1655
- <td rowspan="1" colSpan="1" >userID</td>
1656
-
1657
- <td rowspan="1" colSpan="1" >String</td>
1658
-
1659
- <td rowspan="1" colSpan="1" >是</td>
1660
-
1661
- <td rowspan="1" colSpan="1" >被呼叫用户的用户名</td>
1662
- </tr>
1663
-
1664
- <tr>
1665
- <td rowspan="1" colSpan="1" >type</td>
1666
-
1667
- <td rowspan="1" colSpan="1" >[TUICallType](https://cloud.tencent.com/document/product/647/81015#TUICallType)</td>
1668
-
1669
- <td rowspan="1" colSpan="1" >是</td>
1670
-
1671
- <td rowspan="1" colSpan="1" >通话的媒体类型,参数值说明参见 [TUICallType 通话类型](https://write.woa.com/document/90294110881382400)<br>兼容旧版本:语音通话(type = 1)、视频通话(type = 2)</td>
1672
- </tr>
1673
-
1674
- <tr>
1675
- <td rowspan="1" colSpan="1" >roomID</td>
1676
-
1677
- <td rowspan="1" colSpan="1" >Number</td>
1678
-
1679
- <td rowspan="1" colSpan="1" >否</td>
1680
-
1681
- <td rowspan="1" colSpan="1" >数字房间号,范围 [1, 2147483647]</td>
1682
- </tr>
1683
-
1684
- <tr>
1685
- <td rowspan="1" colSpan="1" >strRoomID</td>
1686
-
1687
- <td rowspan="1" colSpan="1" >String</td>
1688
-
1689
- <td rowspan="1" colSpan="1" >否</td>
1690
-
1691
- <td rowspan="1" colSpan="1" >字符串房间号。**v3.3.1+ 支持**<br>1. roomID 与 strRoomID 是互斥的,若您选用 strRoomID,则 roomID 需要填写为 0。若两者都填,SDK 将优先选用 roomID。<br>2. 不要混用 roomID 和 strRoomID,因为它们之间是不互通的,例如数字 123 和字符串 "123" 是两个完全不同的房间。</td>
1692
- </tr>
1693
-
1694
- <tr>
1695
- <td rowspan="1" colSpan="1" >timeout</td>
1696
-
1697
- <td rowspan="1" colSpan="1" >Number</td>
1698
-
1699
- <td rowspan="1" colSpan="1" >否</td>
1700
-
1701
- <td rowspan="1" colSpan="1" >通话超时时间,默认:30s,单位:秒。timeout = 0,设置为不超时</td>
1702
- </tr>
1703
-
1704
- <tr>
1705
- <td rowspan="1" colSpan="1" >userData</td>
1706
-
1707
- <td rowspan="1" colSpan="1" >String</td>
1708
-
1709
- <td rowspan="1" colSpan="1" >否</td>
1710
-
1711
- <td rowspan="1" colSpan="1" >发起通话时自定义扩展字段,被呼叫用户在 [ON_CALL_RECEIVED](https://write.woa.com/document/86735802757361664) 事件中有该参数</td>
1712
- </tr>
1713
-
1714
- <tr>
1715
- <td rowspan="1" colSpan="1" >[offlinePushInfo](https://cloud.tencent.com/document/product/647/81015#offlinePushInfo)</td>
1716
-
1717
- <td rowspan="1" colSpan="1" >Object</td>
1718
-
1719
- <td rowspan="1" colSpan="1" >否</td>
1720
-
1721
- <td rowspan="1" colSpan="1" >自定义离线消息推送参数</td>
1722
- </tr>
1723
- </table>
1724
-
1725
-
1726
- ### groupCall
1727
-
1728
-
1729
-
1730
- 发起群组通话,**建议使用 calls 接口。**
1731
- ``` javascript
1732
- try {
1733
- await TUICallKitServer.groupCall({
1734
- userIDList: ['jack', 'tom'],
1735
- groupID: "xxx",
1736
- type: TUICallType.VIDEO_CALL
1737
- });
1738
- } catch (error: any) {
1739
- console.error(`[TUICallKit] Failed to call the groupCall API. Reason:${error}`);
1740
- }
1741
- ```
1742
-
1743
- 参数如下表所示:
1744
- <table>
1745
- <tr>
1746
- <td rowspan="1" colSpan="1" >参数</td>
1747
-
1748
- <td rowspan="1" colSpan="1" >类型</td>
1749
-
1750
- <td rowspan="1" colSpan="1" >是否必填</td>
1751
-
1752
- <td rowspan="1" colSpan="1" >含义</td>
1753
- </tr>
1754
-
1755
- <tr>
1756
- <td rowspan="1" colSpan="1" >userIDList</td>
1757
-
1758
- <td rowspan="1" colSpan="1" >Array<String></td>
1759
-
1760
- <td rowspan="1" colSpan="1" >是</td>
1761
-
1762
- <td rowspan="1" colSpan="1" >被呼叫的用户列表</td>
1763
- </tr>
1764
-
1765
- <tr>
1766
- <td rowspan="1" colSpan="1" >type</td>
1767
-
1768
- <td rowspan="1" colSpan="1" >[TUICallType](https://write.woa.com/document/90294110881382400)</td>
1769
-
1770
- <td rowspan="1" colSpan="1" >是</td>
1771
-
1772
- <td rowspan="1" colSpan="1" >通话的媒体类型,参数值说明参见 [TUICallType 通话类型](https://write.woa.com/document/90294110881382400)<br>兼容旧版本:语音通话(type = 1)、视频通话(type = 2)</td>
1773
- </tr>
1774
-
1775
- <tr>
1776
- <td rowspan="1" colSpan="1" >groupID</td>
1777
-
1778
- <td rowspan="1" colSpan="1" >String</td>
1779
-
1780
- <td rowspan="1" colSpan="1" >是</td>
1781
-
1782
- <td rowspan="1" colSpan="1" >通话群组 ID,groupID 的创建可参见 [chat-createGroup API](https://web.sdk.qcloud.com/im/doc/v3/zh-cn/SDK.html#createGroup)</td>
1783
- </tr>
1784
-
1785
- <tr>
1786
- <td rowspan="1" colSpan="1" >roomID</td>
1787
-
1788
- <td rowspan="1" colSpan="1" >Number</td>
1789
-
1790
- <td rowspan="1" colSpan="1" >否</td>
1791
-
1792
- <td rowspan="1" colSpan="1" >数字房间号,范围 [1, 2147483647]</td>
1793
- </tr>
1794
-
1795
- <tr>
1796
- <td rowspan="1" colSpan="1" >strRoomID</td>
1797
-
1798
- <td rowspan="1" colSpan="1" >String</td>
1799
-
1800
- <td rowspan="1" colSpan="1" >否</td>
1801
-
1802
- <td rowspan="1" colSpan="1" >字符串房间号。**v3.3.1+ 支持**<br>1. roomID 与 strRoomID 是互斥的,若您选用 strRoomID,则 roomID 需要填写为 0。若两者都填,SDK 将优先选用 roomID。<br>2. 不要混用 roomID 和 strRoomID,因为它们之间是不互通的,例如数字 123 和字符串 "123" 是两个完全不同的房间。</td>
1803
- </tr>
1804
-
1805
- <tr>
1806
- <td rowspan="1" colSpan="1" >timeout</td>
1807
-
1808
- <td rowspan="1" colSpan="1" >Number</td>
1809
-
1810
- <td rowspan="1" colSpan="1" >否</td>
1811
-
1812
- <td rowspan="1" colSpan="1" >通话超时时间,默认:30s,单位:秒。timeout = 0,设置为不超时</td>
1813
- </tr>
1814
-
1815
- <tr>
1816
- <td rowspan="1" colSpan="1" >userData</td>
1817
-
1818
- <td rowspan="1" colSpan="1" >String</td>
1819
-
1820
- <td rowspan="1" colSpan="1" >否</td>
1821
-
1822
- <td rowspan="1" colSpan="1" >发起通话时自定义扩展字段,被呼叫用户在 [ON_CALL_RECEIVED](https://write.woa.com/document/86735802757361664) 事件中有该参数</td>
1823
- </tr>
1824
-
1825
- <tr>
1826
- <td rowspan="1" colSpan="1" >[offlinePushInfo](https://cloud.tencent.com/document/product/647/81015#offlinePushInfo)</td>
1827
-
1828
- <td rowspan="1" colSpan="1" >Object</td>
1829
-
1830
- <td rowspan="1" colSpan="1" >否</td>
1831
-
1832
- <td rowspan="1" colSpan="1" >自定义离线消息推送参数</td>
1833
- </tr>
1834
- </table>
1835
-
1836
-
1837
- ### joinInGroupCall
1838
-
1839
-
1840
-
1841
- 加入群组中已有的音视频通话,**建议使用 join 接口。**
1842
-
1843
- > **注意:**
1844
- >
1845
-
1846
- > **v3.1.2+ 支持。**
1847
- >
1848
-
1849
-
1850
- > **说明:**
1851
- >
1852
- > - 加入群组中已有的音视频通话前,需要提前创建或加入IM 群组,并且群组中已有用户在通话中,如果已经创建,请忽略。
1853
- > - 群组的创建详见: [IM 群组管理](https://cloud.tencent.com/document/product/269/75395#.E5.88.9B.E5.BB.BA.E7.BE.A4.E7.BB.84) ,或者您也可以直接使用 [IM TUIKit](https://cloud.tencent.com/document/product/269/68493),一站式集成聊天、通话等场景。
1854
-
1855
- ``` javascript
1856
- try {
1857
- const params = {
1858
- type: TUICallType.VIDEO_CALL,
1859
- groupID: "xxx",
1860
- roomID: 0,
1861
- };
1862
- await TUICallKitServer.joinInGroupCall(params);
1863
- } catch (error: any) {
1864
- console.error(`[TUICallKit] Failed to call the enableMuteMode API. Reason: ${error}`);
1865
- }
1866
- ```
1867
-
1868
- 参数列表:
1869
- <table>
1870
- <tr>
1871
- <td rowspan="1" colSpan="1" >参数</td>
1872
-
1873
- <td rowspan="1" colSpan="1" >类型</td>
1874
-
1875
- <td rowspan="1" colSpan="1" >是否必填</td>
1876
-
1877
- <td rowspan="1" colSpan="1" >含义</td>
1878
- </tr>
1879
-
1880
- <tr>
1881
- <td rowspan="1" colSpan="1" >type</td>
1882
-
1883
- <td rowspan="1" colSpan="1" >[TUICallType](https://cloud.tencent.com/document/product/647/81015#TUICallType)</td>
1884
-
1885
- <td rowspan="1" colSpan="1" >是</td>
1886
-
1887
- <td rowspan="1" colSpan="1" >通话的媒体类型,例如视频通话、语音通话</td>
1888
- </tr>
1889
-
1890
- <tr>
1891
- <td rowspan="1" colSpan="1" >groupID</td>
1892
-
1893
- <td rowspan="1" colSpan="1" >String</td>
1894
-
1895
- <td rowspan="1" colSpan="1" >是</td>
1896
-
1897
- <td rowspan="1" colSpan="1" >此次群组通话的群 ID</td>
1898
- </tr>
1899
-
1900
- <tr>
1901
- <td rowspan="1" colSpan="1" >roomID</td>
1902
-
1903
- <td rowspan="1" colSpan="1" >number</td>
1904
-
1905
- <td rowspan="1" colSpan="1" >是</td>
1906
-
1907
- <td rowspan="1" colSpan="1" >此次通话的音视频房间 ID</td>
1908
- </tr>
1909
- </table>