Skip to content

Commit 0be5c14

Browse files
chenximolindalli
andauthored
feat: 支持 TUICallKit (#1312)
Co-authored-by: lindalli <[email protected]>
1 parent 516b5c2 commit 0be5c14

File tree

5 files changed

+27
-26
lines changed

5 files changed

+27
-26
lines changed

uni-app/TUIKit-vue2-js/App.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@
3535
uni.$aegis = aegis
3636
// 首先需要通过 uni.requireNativePlugin("ModuleName") 获取 module
3737
// #ifdef APP-PLUS
38-
const TUICalling = uni.requireNativePlugin('TUICallingUniPlugin-TUICallingModule');
39-
logger.log(`| app | TUICallingUniPlugin-TUICallingModule | TUICalling: ${TUICalling}`);
40-
if(typeof(TUICalling) == 'undefined') {
41-
logger.error('如果需要音视频功能,请集成原生插件,使用真机运行并且自定义基座调试哦~ 插件地址:https://ext.dcloud.net.cn/plugin?id=7097 , 调试地址:https://nativesupport.dcloud.net.cn/NativePlugin/use/use');
38+
const TUICallKit = uni.requireNativePlugin('TencentCloud-TUICallKit');
39+
logger.log(`| app | TencentCloud-TUICallKit | TUICalling: ${TUICallKit}`);
40+
if(typeof(TUICallKit) == 'undefined') {
41+
logger.error('如果需要音视频功能,请集成原生插件,使用真机运行并且自定义基座调试哦~ 插件地址:https://ext.dcloud.net.cn/plugin?id=9035 , 调试地址:https://nativesupport.dcloud.net.cn/NativePlugin/use/use');
4242
}
4343
// #endif
4444
export default {
@@ -67,9 +67,9 @@
6767
// #endif
6868
// 将原生插件挂载在 uni 上
6969
// #ifdef APP-PLUS
70-
uni.$TUICalling = TUICalling;
70+
uni.$TUICallKit = TUICallKit;
7171
// #endif
72-
// 如果您已创建了 tim,请将 tim 实例挂载在 wx 上,且不可以修改 wx.$TIM(修改变量可能导致 TUICalling 组件无法正常使用), 完成 TUICalling 初始化,
72+
// 如果您已创建了 tim,请将 tim 实例挂载在 wx 上,且不可以修改 wx.$TIM(修改变量可能导致 TUICallKit 组件无法正常使用), 完成 TUICallKit 初始化,
7373
// 如果您没有创建,可以不传
7474
// #ifdef MP-WEIXIN
7575
wx.$TIM = uni.$TUIKit;

uni-app/TUIKit-vue2-js/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ uni.$TUIKit.login({userID: 'your userID', userSig: 'your userSig'})
7979
```
8080

8181
## 开启音视频通话
82-
- 打包 App 集成,请参见原生音视频插件接入 [原生音视频插件](https://ext.dcloud.net.cn/plugin?id=7097)
83-
- 打包小程序集成 ,请参见小程序音视频插件接入 [腾讯云小程序音视频插件](https://ext.dcloud.net.cn/plugin?id=7151)
82+
- 打包到 APP 请参考官网文档: [音视频通话(uniapp-客户端)](https://cloud.tencent.com/document/product/269/83857)
83+
- 打包到小程序请参考官网文档:[音视频通话(uniapp-小程序)](https://cloud.tencent.com/document/product/269/83858)
8484

8585
## 常见问题
8686
[](id:Q1)

uni-app/TUIKit-vue2-js/components/tui-chat/message-input/index.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ import TUIEmoji from '../message-elements/emoji/index';
9797
import TUICommonWords from '../message-private/common-words/index';
9898
import TUIOrderList from '../message-private/order-list/index';
9999
import TUIServiceEvaluation from '../message-private/service-evaluation/index';
100-
100+
import logger from '../../../utils/logger';
101101
export default {
102102
data() {
103103
return {
@@ -437,18 +437,18 @@ export default {
437437
const { userID } = this.conversation.userProfile;
438438
439439
// #ifdef APP-PLUS
440-
if(typeof(uni.$TUICalling) === 'undefined') {
440+
if(typeof(uni.$TUICallKit) === 'undefined') {
441441
logger.error('请使用真机运行并且自定义基座调试,可能影响音视频功能~ 插件地址:https://ext.dcloud.net.cn/plugin?id=7097 , 调试地址:https://nativesupport.dcloud.net.cn/NativePlugin/use/use');
442442
uni.showToast({
443443
title: '请使用真机运行并且自定义基座调试,可能影响音视频功能~ ',
444444
icon: 'none',
445445
duration: 3000
446446
});
447447
} else {
448-
uni.$TUICalling.call(
448+
uni.$TUICallKit.call(
449449
{
450450
userID: userID,
451-
type: value
451+
callMediaType: value
452452
},
453453
res => {
454454
console.log(JSON.stringify(res));

uni-app/TUIKit-vue2-js/manifest.json

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name" : "云通信IM",
3-
"appid" : "__UNI__C42E036",
3+
"appid" : "__UNI__6E2D796",
44
"description" : "基于 TIM 实现场景化接入方案",
55
"versionName" : "1.0.1",
66
"versionCode" : "100",
@@ -55,32 +55,33 @@
5555
"NSPhotoLibraryAddUsageDescription" : "app 想访问你的相册",
5656
"NSCameraUsageDescription" : "app 想访问你的摄像头",
5757
"NSMicrophoneUsageDescription" : "app 想访问你的麦克风"
58-
}
58+
},
59+
"dSYMs" : false
5960
},
6061
"sdkConfigs" : {
6162
"ad" : {}
6263
}
6364
},
6465
"nativePlugins" : {
65-
"TUICallingUniPlugin-TUICallingModule" : {
66+
"TencentCloud-TUICallKit" : {
6667
"__plugin_info__" : {
67-
"name" : "【官方】腾讯云原生音视频插件",
68-
"description" : "TUICalling 是 腾讯云官方推出 的基于腾讯云实时音视频 TRTC 和即时通信 IM 服务组合而成的插件,支持双人和多人音视频通话。插件提供了全套定制UI,开发者仅需三个 API 就可实现",
68+
"name" : "【官方】腾讯云音视频通话插件TencentCloud-TUICallKit",
69+
"description" : "TUICallKit 是腾讯云官方推出的音视频通话插件,支持 1v1 通话和群组通话,并提供“类微信\"的 UI 交互,开发者仅需三个 API 就可实现",
6970
"platforms" : "Android,iOS",
70-
"url" : "https://ext.dcloud.net.cn/plugin?id=7097",
71-
"android_package_name" : "",
72-
"ios_bundle_id" : "",
71+
"url" : "https://ext.dcloud.net.cn/plugin?id=9035",
72+
"android_package_name" : "com.tencent.tuikit.demo.xa",
73+
"ios_bundle_id" : "com.tencent.tuikit.demo.xa",
7374
"isCloud" : true,
7475
"bought" : 1,
75-
"pid" : "7097",
76+
"pid" : "9035",
7677
"parameters" : {}
7778
}
7879
}
7980
}
8081
},
8182
"quickapp" : {},
8283
"mp-weixin" : {
83-
"appid": "appid",
84+
"appid" : "appid",
8485
"setting" : {
8586
"urlCheck" : false,
8687
"es6" : true,

uni-app/TUIKit-vue2-js/pages/TUI-Login/login.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,17 +193,17 @@ export default {
193193
194194
// 登录原生插件
195195
// #ifdef APP-PLUS
196-
if(typeof(uni.$TUICalling) == 'undefined') {
196+
if(typeof(uni.$TUICallKit) == 'undefined') {
197197
uni.showToast({
198198
title: '如果需要音视频功能,请集成插件使用真机运行并且自定义基座调试哦~',
199199
icon: 'none',
200200
duration: 3000
201201
});
202-
logger.error('请使用真机运行并且自定义基座调试,否则影响音视频功能~ 插件地址:https://ext.dcloud.net.cn/plugin?id=7097 , 调试地址:https://nativesupport.dcloud.net.cn/NativePlugin/use/use');
202+
logger.error('请使用真机运行并且自定义基座调试,否则影响音视频功能~ 插件地址:https://ext.dcloud.net.cn/plugin?id=9035 , 调试地址:https://nativesupport.dcloud.net.cn/NativePlugin/use/use');
203203
} else {
204-
uni.$TUICalling.login(
204+
uni.$TUICallKit.login(
205205
{
206-
sdkAppID: SDKAppID,
206+
SDKAppID: SDKAppID,
207207
userID: userID,
208208
userSig: userSig
209209
},

0 commit comments

Comments
 (0)