Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tencentcloud/call-uikit-wechat

Package Overview
Dependencies
Maintainers
14
Versions
94
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tencentcloud/call-uikit-wechat - npm Package Compare versions

Comparing version 2.1.8 to 2.1.9-beta.0

2

index.d.ts
import { TUIGlobal, TUIStore, StoreName, TUICallKitServer, NAME, StatusChange as STATUS, CallRole, CallMediaType, VideoResolution, VideoDisplayMode, t, uiDesign, FeatureButton } from './TUICallService/index';
declare const Version = "2.1.8";
declare const Version = "2.1.9-beta.0";
export { TUIGlobal, TUIStore, StoreName, TUICallKitServer, NAME, STATUS, CallRole, CallMediaType, VideoResolution, VideoDisplayMode, Version, t, uiDesign, FeatureButton, };

@@ -18,3 +18,3 @@ "use strict";

Object.defineProperty(exports, "FeatureButton", { enumerable: true, get: function () { return index_1.FeatureButton; } });
const Version = '2.1.8'; // basic-demo 原来上报使用
const Version = '2.1.9-beta.0'; // basic-demo 原来上报使用
exports.Version = Version;
{
"name": "@tencentcloud/call-uikit-wechat",
"version": "2.1.8",
"version": "2.1.9-beta.0",
"main": "./tuicall-uikit-vue.umd.js",

@@ -5,0 +5,0 @@ "module": "./tuicall-uikit-vue.es.js",

import { ITUICallService, ICallParams, IGroupCallParams, ICallbackParam, ISelfInfoParams, IInviteUserParams, IJoinInGroupCallParams, IInitParams } from '../interface/ICallService';
import { LanguageType, LOG_LEVEL, VideoDisplayMode, VideoResolution } from '../const/index';
import { LanguageType, LOG_LEVEL, VideoDisplayMode, VideoResolution, FeatureButton } from '../const/index';
import { ITUIGlobal } from '../interface/ITUIGlobal';

@@ -34,2 +34,5 @@ import { ITUIStore } from '../interface/ITUIStore';

enableMuteMode(enable: boolean): Promise<void>;
hideFeatureButton(buttonName: FeatureButton): void;
setLocalViewBackgroundImage(url: string): void;
setRemoteViewBackgroundImage(userId: string, url: string): void;
accept(): Promise<void>;

@@ -36,0 +39,0 @@ hangup(): Promise<void>;

@@ -7,2 +7,4 @@ import { FeatureButton } from "../const/index";

setRemoteViewBackgroundImage: (userId: string, url: string) => void;
setEngineInstance: (engineInstance: any) => void;
setTUIStore: (tuiStore: any) => void;
}

@@ -14,3 +16,7 @@ export declare class UIDesign implements IUIDesign {

private _isSetViewBackgroundConfig;
private _tuiCallEngine;
private _tuiStore;
private _updateViewBackground;
setEngineInstance(engineInstance: any): void;
setTUIStore(tuiStore: any): void;
updateViewBackgroundUserId(name: any): void;

@@ -17,0 +23,0 @@ hideFeatureButton(buttonName: FeatureButton): void;

@@ -9,3 +9,2 @@ "use strict";

const is_empty_1 = __importDefault(require("../utils/is-empty"));
const index_2 = require("./index");
const DEFAULT_LOCAL_USER_ID = '_local_user_id';

@@ -21,2 +20,4 @@ class UIDesign {

this._isSetViewBackgroundConfig = { remote: false, local: false };
this._tuiCallEngine = null;
this._tuiStore = null;
}

@@ -30,12 +31,20 @@ static getInstance() {

_updateViewBackground() {
const customUIConfig = index_2.TUIStore.getData(index_1.StoreName.CALL, index_1.NAME.CUSTOM_UI_CONFIG);
const { userId } = index_2.TUIStore.getData(index_1.StoreName.CALL, index_1.NAME.LOCAL_USER_INFO);
var _a, _b, _c;
const customUIConfig = (_a = this._tuiStore) === null || _a === void 0 ? void 0 : _a.getData(index_1.StoreName.CALL, index_1.NAME.CUSTOM_UI_CONFIG);
const { userId } = (_b = this._tuiStore) === null || _b === void 0 ? void 0 : _b.getData(index_1.StoreName.CALL, index_1.NAME.LOCAL_USER_INFO);
if (Object.keys(this._viewConfig.viewBackground.remote).includes(userId)) {
delete this._viewConfig.viewBackground.remote[userId];
}
index_2.TUIStore.update(index_1.StoreName.CALL, index_1.NAME.CUSTOM_UI_CONFIG, Object.assign(Object.assign({}, customUIConfig), { viewBackground: Object.assign(Object.assign({}, this._viewConfig.viewBackground.remote), this._viewConfig.viewBackground.local) }));
(_c = this._tuiStore) === null || _c === void 0 ? void 0 : _c.update(index_1.StoreName.CALL, index_1.NAME.CUSTOM_UI_CONFIG, Object.assign(Object.assign({}, customUIConfig), { viewBackground: Object.assign(Object.assign({}, this._viewConfig.viewBackground.remote), this._viewConfig.viewBackground.local) }));
}
setEngineInstance(engineInstance) {
this._tuiCallEngine = engineInstance;
}
setTUIStore(tuiStore) {
this._tuiStore = tuiStore;
}
updateViewBackgroundUserId(name) {
var _a, _b;
if (name === 'local') {
const { userId } = index_2.TUIStore.getData(index_1.StoreName.CALL, index_1.NAME.LOCAL_USER_INFO);
const { userId } = (_a = this._tuiStore) === null || _a === void 0 ? void 0 : _a.getData(index_1.StoreName.CALL, index_1.NAME.LOCAL_USER_INFO);
if (Object.keys(this._viewConfig.viewBackground.remote).includes(userId)) {

@@ -57,3 +66,3 @@ delete this._viewConfig.viewBackground.remote[userId];

if (this._isSetViewBackgroundConfig.remote && Object.keys(remoteViewBackgroundConfig).includes('*')) {
const remoteUserInfoList = index_2.TUIStore.getData(index_1.StoreName.CALL, index_1.NAME.REMOTE_USER_INFO_LIST);
const remoteUserInfoList = (_b = this._tuiStore) === null || _b === void 0 ? void 0 : _b.getData(index_1.StoreName.CALL, index_1.NAME.REMOTE_USER_INFO_LIST);
const remoteUserIdList = remoteUserInfoList.map((item) => item.userId);

@@ -71,8 +80,18 @@ remoteUserIdList.forEach((userId) => {

hideFeatureButton(buttonName) {
const customUIConfig = index_2.TUIStore.getData(index_1.StoreName.CALL, index_1.NAME.CUSTOM_UI_CONFIG);
index_2.TUIStore.update(index_1.StoreName.CALL, index_1.NAME.CUSTOM_UI_CONFIG, Object.assign(Object.assign({}, customUIConfig), { button: Object.assign(Object.assign({}, customUIConfig.button), { [buttonName]: false }) }));
var _a, _b, _c, _d;
(_b = (_a = this._tuiCallEngine) === null || _a === void 0 ? void 0 : _a.reportLog) === null || _b === void 0 ? void 0 : _b.call(_a, {
name: 'TUICallKit.hideFeatureButton.start',
data: { buttonName },
});
const customUIConfig = (_c = this._tuiStore) === null || _c === void 0 ? void 0 : _c.getData(index_1.StoreName.CALL, index_1.NAME.CUSTOM_UI_CONFIG);
(_d = this._tuiStore) === null || _d === void 0 ? void 0 : _d.update(index_1.StoreName.CALL, index_1.NAME.CUSTOM_UI_CONFIG, Object.assign(Object.assign({}, customUIConfig), { button: Object.assign(Object.assign({}, customUIConfig.button), { [buttonName]: false }) }));
}
setLocalViewBackgroundImage(url) {
var _a, _b, _c;
(_b = (_a = this._tuiCallEngine) === null || _a === void 0 ? void 0 : _a.reportLog) === null || _b === void 0 ? void 0 : _b.call(_a, {
name: 'TUICallKit.setLocalViewBackgroundImage.start',
data: { url },
});
this._isSetViewBackgroundConfig.local = true;
let { userId } = index_2.TUIStore.getData(index_1.StoreName.CALL, index_1.NAME.LOCAL_USER_INFO);
let { userId } = (_c = this._tuiStore) === null || _c === void 0 ? void 0 : _c.getData(index_1.StoreName.CALL, index_1.NAME.LOCAL_USER_INFO);
if ((0, is_empty_1.default)(userId)) {

@@ -85,2 +104,7 @@ userId = DEFAULT_LOCAL_USER_ID;

setRemoteViewBackgroundImage(userId, url) {
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.setRemoteViewBackgroundImage.start',
data: { userId, url },
});
this._isSetViewBackgroundConfig.remote = true;

@@ -87,0 +111,0 @@ if (userId === '*') {

@@ -189,7 +189,7 @@ "use strict";

try {
const { room_id: roomId = '', room_id_type: roomIdType = 0, call_media_type: callType = '', user_list: userList } = groupAttributes[index_1.NAME.INNER_ATTR_KIT_INFO] && JSON.parse(groupAttributes[index_1.NAME.INNER_ATTR_KIT_INFO]);
let userListInfo = userList ? userList.map(user => user.userid) : [];
if (userListInfo.length > 0) {
userListInfo = yield getRemoteUserProfile(userListInfo, tim, TUIStore);
}
const { room_id: roomId = '', room_id_type: roomIdType = 0, call_media_type: callType = '',
// @ts-ignore
user_list: userList, } = 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 };

@@ -196,0 +196,0 @@ }

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc