@tencentcloud/call-uikit-wechat
Advanced tools
Comparing version 2.1.9 to 2.2.0
import { TUIGlobal, TUIStore, StoreName, TUICallKitServer, NAME, StatusChange as STATUS, CallRole, CallMediaType, VideoResolution, VideoDisplayMode, t, uiDesign, FeatureButton, LayoutMode } from './TUICallService/index'; | ||
declare const Version = "2.1.9"; | ||
declare const Version = "2.2.0"; | ||
export { TUIGlobal, TUIStore, StoreName, TUICallKitServer, NAME, STATUS, CallRole, CallMediaType, VideoResolution, VideoDisplayMode, Version, t, uiDesign, FeatureButton, LayoutMode, }; |
@@ -19,3 +19,3 @@ "use strict"; | ||
Object.defineProperty(exports, "LayoutMode", { enumerable: true, get: function () { return index_1.LayoutMode; } }); | ||
const Version = '2.1.9'; // basic-demo 原来上报使用 | ||
const Version = '2.2.0'; // basic-demo 原来上报使用 | ||
exports.Version = Version; |
{ | ||
"name": "@tencentcloud/call-uikit-wechat", | ||
"version": "2.1.9", | ||
"version": "2.2.0", | ||
"main": "./tuicall-uikit-vue.umd.js", | ||
@@ -5,0 +5,0 @@ "module": "./tuicall-uikit-vue.es.js", |
@@ -17,2 +17,4 @@ import { ITUICallService, ICallParams, IGroupCallParams, ICallbackParam, ISelfInfoParams, IInviteUserParams, IJoinInGroupCallParams, IInitParams } from '../interface/ICallService'; | ||
private _bellContext; | ||
private _isFromChat; | ||
private _currentGroupId; | ||
private _defaultOfflinePushInfo; | ||
@@ -100,4 +102,3 @@ constructor(); | ||
private _removeListenChatEvent; | ||
private _handleGetGroupAttributes; | ||
private _handleChatGroupCallUsers; | ||
private _handleGroupAttributesUpdated; | ||
getGroupMemberList(count: number, offset: number): Promise<any>; | ||
@@ -104,0 +105,0 @@ getGroupProfile(): Promise<any>; |
@@ -113,2 +113,7 @@ "use strict"; | ||
setLayoutMode(layoutMode) { | ||
var _a, _b; | ||
(_b = (_a = this._tuiCallEngine) === null || _a === void 0 ? void 0 : _a.reportLog) === null || _b === void 0 ? void 0 : _b.call(_a, { | ||
name: 'TUICallKit.setLayoutMode.start', | ||
data: { layoutMode }, | ||
}); | ||
const customUIConfig = this._tuiStore.getData(index_1.StoreName.CALL, index_1.NAME.CUSTOM_UI_CONFIG); | ||
@@ -118,2 +123,7 @@ this._tuiStore.update(index_1.StoreName.CALL, index_1.NAME.CUSTOM_UI_CONFIG, Object.assign(Object.assign({}, customUIConfig), { layoutMode })); | ||
setCameraDefaultState(isOpen) { | ||
var _a, _b; | ||
(_b = (_a = this._tuiCallEngine) === null || _a === void 0 ? void 0 : _a.reportLog) === null || _b === void 0 ? void 0 : _b.call(_a, { | ||
name: 'TUICallKit.setCameraDefaultState.start', | ||
data: { isOpen }, | ||
}); | ||
const customUIConfig = (0, index_2.deepClone)(this._tuiStore.getData(index_1.StoreName.CALL, index_1.NAME.CUSTOM_UI_CONFIG)); | ||
@@ -120,0 +130,0 @@ if (!Object.keys(customUIConfig.button).includes(index_1.FeatureButton.Camera)) { |
@@ -10,13 +10,3 @@ import { IUserInfo } from '../interface/ICallService'; | ||
export declare function getGroupProfile(groupID: string, tim: any): Promise<any>; | ||
export declare function getGroupAttributes(TUIStore: ITUIStore, tim: any): Promise<any>; | ||
export declare function getJoinGroupCallInfo(TUIStore: ITUIStore, groupAttributes: any, tim: any): Promise<{ | ||
roomId: any; | ||
roomIdType: any; | ||
callType: any; | ||
userListInfo: any; | ||
} | { | ||
roomId?: undefined; | ||
roomIdType?: undefined; | ||
callType?: undefined; | ||
userListInfo?: undefined; | ||
}>; | ||
export declare function getGroupAttributes(tim: any, groupId: string): Promise<any>; | ||
export declare function updateStoreBasedOnGroupAttributes(groupAttributes: any, TUIStore: ITUIStore, that: any): Promise<void>; |
@@ -12,3 +12,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getJoinGroupCallInfo = exports.getGroupAttributes = exports.getGroupProfile = exports.getGroupMemberList = exports.generateStatusChangeText = exports.generateText = exports.getRemoteUserProfile = exports.getMyProfile = exports.setDefaultUserInfo = void 0; | ||
exports.updateStoreBasedOnGroupAttributes = exports.getGroupAttributes = exports.getGroupProfile = exports.getGroupMemberList = exports.generateStatusChangeText = exports.generateText = exports.getRemoteUserProfile = exports.getMyProfile = exports.setDefaultUserInfo = void 0; | ||
const index_1 = require("../const/index"); | ||
@@ -158,8 +158,6 @@ const index_2 = require("../locales/index"); | ||
const res = yield tim.getGroupProfile({ groupID }); | ||
if (res.code === 0) { | ||
return res.data.group || groupProfile; | ||
} | ||
return res.data.group || groupProfile; | ||
} | ||
catch (error) { | ||
console.error(`${index_1.NAME.PREFIX}getGroupProfile failed, error: ${error}.`); | ||
console.warn(`${index_1.NAME.PREFIX}getGroupProfile failed, error: ${error}.`); | ||
return groupProfile; | ||
@@ -171,15 +169,16 @@ } | ||
// Get group attribute | ||
function getGroupAttributes(TUIStore, tim) { | ||
function getGroupAttributes(tim, groupId) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const groupId = TUIStore.getData(index_1.StoreName.CALL, index_1.NAME.GROUP_ID); | ||
if (!groupId) | ||
return {}; | ||
try { | ||
const { code, data } = yield tim.getGroupAttributes({ | ||
const { data } = yield tim.getGroupAttributes({ | ||
groupID: groupId, | ||
keyList: [] | ||
}); | ||
if (code === 0) | ||
return data; | ||
return (data === null || data === void 0 ? void 0 : data.groupAttributes) || {}; | ||
} | ||
catch (error) { | ||
console.error(`${index_1.NAME.PREFIX}_getGroupAttributes fail: ${error}`); | ||
console.warn(`${index_1.NAME.PREFIX}getGroupAttributes fail: ${error}`); | ||
return {}; | ||
} | ||
@@ -189,18 +188,31 @@ }); | ||
exports.getGroupAttributes = getGroupAttributes; | ||
function getJoinGroupCallInfo(TUIStore, groupAttributes, tim) { | ||
// Handling the chat+call scenario, data required for the joinInGroupCall API: update store / clear relevant store data | ||
function updateStoreBasedOnGroupAttributes(groupAttributes, TUIStore, that) { | ||
var _a, _b; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
(_b = (_a = that._tuiCallEngine) === null || _a === void 0 ? void 0 : _a.reportLog) === null || _b === void 0 ? void 0 : _b.call(_a, { | ||
name: 'TUICallKit.getJoinGroupCallInfo.success', | ||
data: { groupAttributes }, | ||
}); | ||
try { | ||
const { room_id: roomId = '', room_id_type: roomIdType = 0, call_media_type: callType = '', | ||
const { group_id: groupId = '', room_id: roomId = 0, room_id_type: roomIdType = 0, call_media_type: callType = index_1.NAME.UNKNOWN, | ||
// @ts-ignore | ||
user_list: userList, } = groupAttributes[index_1.NAME.INNER_ATTR_KIT_INFO] ? JSON.parse(groupAttributes[index_1.NAME.INNER_ATTR_KIT_INFO]) : {}; | ||
user_list: userList, // The default value of the user list returned by the background is null | ||
} = groupAttributes[index_1.NAME.INNER_ATTR_KIT_INFO] ? JSON.parse(groupAttributes[index_1.NAME.INNER_ATTR_KIT_INFO]) : {}; | ||
let userListInfo = (userList || []).map(user => user.userid); | ||
userListInfo = userListInfo.length && (yield getRemoteUserProfile(userListInfo, tim, TUIStore)); | ||
return { roomId, roomIdType, callType, userListInfo }; | ||
userListInfo = userListInfo.length && (yield getRemoteUserProfile(userListInfo, that._tim, TUIStore)); | ||
const updateStoreParams = { | ||
[index_1.NAME.GROUP_ID]: groupId, | ||
[index_1.NAME.GROUP_CALL_MEMBERS]: userListInfo, | ||
[index_1.NAME.ROOM_ID]: roomId, | ||
[index_1.NAME.CALL_MEDIA_TYPE]: index_1.CallType[callType], | ||
[index_1.NAME.ROOM_ID_TYPE]: roomIdType, | ||
}; | ||
TUIStore.updateStore(updateStoreParams, index_1.StoreName.CALL); | ||
} | ||
catch (error) { | ||
console.error(`${index_1.NAME.PREFIX} getJoinGroupCallInfo fail, error: ${error}`); | ||
return {}; | ||
console.warn(`${index_1.NAME.PREFIX}updateStoreBasedOnGroupAttributes fail, error: ${error}`); | ||
} | ||
}); | ||
} | ||
exports.getJoinGroupCallInfo = getJoinGroupCallInfo; | ||
exports.updateStoreBasedOnGroupAttributes = updateStoreBasedOnGroupAttributes; |
@@ -83,2 +83,3 @@ /** | ||
export declare const CallType: { | ||
readonly unknown: CallMediaType.UNKNOWN; | ||
readonly audio: CallMediaType.AUDIO; | ||
@@ -85,0 +86,0 @@ readonly video: CallMediaType.VIDEO; |
@@ -90,2 +90,3 @@ "use strict"; | ||
exports.CallType = { | ||
'unknown': CallMediaType.UNKNOWN, | ||
'audio': CallMediaType.AUDIO, | ||
@@ -92,0 +93,0 @@ 'video': CallMediaType.VIDEO, |
@@ -59,3 +59,3 @@ "use strict"; | ||
}; | ||
exports.NAME = Object.assign(Object.assign({ PREFIX: '【CallService】', AUDIO: 'audio', VIDEO: 'video', LOCAL_VIDEO: 'localVideo', ERROR: 'error', TIMEOUT: 'timeout', RAF: 'raf', INTERVAL: 'interval', DEFAULT: 'default', BOOLEAN: 'boolean', STRING: 'string', NUMBER: 'number', OBJECT: 'object', ARRAY: 'array', FUNCTION: 'function', UNDEFINED: "undefined", ALL: 'all', MYSELF: 'myself', DEVICE_LIST: 'deviceList', CAMERA_POSITION: 'cameraPosition', CUSTOM_UI_CONFIG: 'customUIConfig' }, exports.CALL_DATA_KEY), exports.CHAT_DATA_KEY); | ||
exports.NAME = Object.assign(Object.assign({ PREFIX: '【CallService】', AUDIO: 'audio', VIDEO: 'video', LOCAL_VIDEO: 'localVideo', ERROR: 'error', TIMEOUT: 'timeout', RAF: 'raf', INTERVAL: 'interval', DEFAULT: 'default', BOOLEAN: 'boolean', STRING: 'string', NUMBER: 'number', OBJECT: 'object', ARRAY: 'array', FUNCTION: 'function', UNDEFINED: "undefined", UNKNOWN: 'unknown', ALL: 'all', MYSELF: 'myself', DEVICE_LIST: 'deviceList', CAMERA_POSITION: 'cameraPosition', CUSTOM_UI_CONFIG: 'customUIConfig' }, exports.CALL_DATA_KEY), exports.CHAT_DATA_KEY); | ||
exports.AudioCallIcon = 'https://web.sdk.qcloud.com/component/TUIKit/assets/call.png'; | ||
@@ -62,0 +62,0 @@ exports.VideoCallIcon = 'https://web.sdk.qcloud.com/component/TUIKit/assets/call-video-reverse.svg'; |
@@ -42,2 +42,3 @@ export declare const en: { | ||
Done: string; | ||
'exist group call': string; | ||
'camera enabled': string; | ||
@@ -44,0 +45,0 @@ 'camera disabled': string; |
@@ -49,2 +49,3 @@ "use strict"; | ||
'Done': 'Done', | ||
'exist group call': 'A group call already exists in the current group', | ||
// UI3.0 新增 | ||
@@ -51,0 +52,0 @@ 'camera enabled': 'Camera On', |
@@ -26,2 +26,3 @@ "use strict"; | ||
NO_CAMERA_DEVICE_PERMISSION: 'no camera access', | ||
EXIST_GROUP_CALL: 'exist group call', | ||
}; | ||
@@ -28,0 +29,0 @@ exports.languageData = { |
@@ -33,2 +33,3 @@ export declare const ja_JP: { | ||
Done: string; | ||
'exist group call': string; | ||
'open camera': string; | ||
@@ -35,0 +36,0 @@ 'close camera': string; |
@@ -40,2 +40,3 @@ "use strict"; | ||
'Done': '完了', | ||
'exist group call': '現在のグループには既にグループ通話が存在しています', | ||
// UI3.0文案 | ||
@@ -42,0 +43,0 @@ 'open camera': 'オープンカメラ', |
@@ -42,2 +42,3 @@ export declare const zh: { | ||
Done: string; | ||
'exist group call': string; | ||
'camera enabled': string; | ||
@@ -44,0 +45,0 @@ 'camera disabled': string; |
@@ -49,2 +49,3 @@ "use strict"; | ||
'Done': '完成', | ||
'exist group call': '当前群组中已经存在群组通话', | ||
// UI3.0 新增 | ||
@@ -51,0 +52,0 @@ 'camera enabled': '摄像头已开', |
@@ -42,3 +42,3 @@ "use strict"; | ||
rules: [index_1.NAME.NUMBER], | ||
range: `1~${index_1.MAX_NUMBER_ROOM_ID}`, | ||
range: `0~${index_1.MAX_NUMBER_ROOM_ID}`, | ||
allowEmpty: false, | ||
@@ -77,3 +77,3 @@ }, | ||
rules: [index_1.NAME.NUMBER], | ||
range: `1~${index_1.MAX_NUMBER_ROOM_ID}`, | ||
range: `0~${index_1.MAX_NUMBER_ROOM_ID}`, | ||
allowEmpty: false | ||
@@ -80,0 +80,0 @@ }, |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
507840
6578