diff --git a/TUILiveKit.main.js b/TUILiveKit.main.js
index d02af1f..48a1f8f 100644
--- a/TUILiveKit.main.js
+++ b/TUILiveKit.main.js
@@ -509,6 +509,9 @@ function bindIPCEvent() {
ipcMain.handle('app-path', () => {
return app.getAppPath();
});
+ ipcMain.handle('get-language', () => {
+ return language;
+ });
ipcMain.handle('window-type', (event) => {
if (event.sender === windowMap.main?.webContents) {
@@ -794,10 +797,8 @@ function bindIPCEvent() {
postMessageToWindow(windowMap.confirm, 'port-to-confirm', null, [port]);
});
- ipcMain.on('set-language', (event, args) => {
- console.log(`${logPrefix}set-language`, args);
- language = args;
- });
+ // Legacy 'set-language' channel removed — language updates now flow through
+ // the V2 mainProcessHandlers['setLanguage'] via ipcBridge.sendToElectronMain().
ipcMain.on('show-context-menu', (event) => {
const template = [
@@ -948,6 +949,7 @@ function bindIPCEvent() {
function unbindIPCMainEvent() {
ipcMain.removeHandler('app-path');
+ ipcMain.removeHandler('get-language');
ipcMain.removeHandler('window-type');
ipcMain.removeAllListeners('window-message'); // V2 IPC message router
ipcMain.removeAllListeners('on-minimize-window');
@@ -957,7 +959,6 @@ function unbindIPCMainEvent() {
ipcMain.removeAllListeners('close-child');
ipcMain.removeAllListeners('login');
ipcMain.removeAllListeners('port-to-child');
- ipcMain.removeAllListeners('set-language');
ipcMain.removeAllListeners('show-context-menu');
ipcMain.removeAllListeners('start-use-driver-installer');
ipcMain.removeAllListeners('app-quit-confirmed');
diff --git a/electron-builder.json5 b/electron-builder.json5
index c9837bb..7775c8a 100644
--- a/electron-builder.json5
+++ b/electron-builder.json5
@@ -23,10 +23,6 @@
{
"from": "node_modules/trtc-electron-sdk/build/mac-framework/${arch}/",
"to": "./Frameworks"
- },
- {
- "from": "node_modules/trtc-electron-plugin-xmagic/plugin/XMagic/mac/",
- "to": "./Resources/app/plugin/XMagic/mac/"
}
],
"target": ["dmg"],
@@ -47,21 +43,6 @@
"**/*"
]
},
- {
- "from": "node_modules/trtc-electron-plugin-xmagic/plugin/XMagic/win/${arch}/platforms/",
- "to": "./resources/platforms",
- "filter": ["**/*"],
- },
- {
- "from": "node_modules/trtc-electron-plugin-xmagic/plugin/XMagic/win/${arch}/",
- "to": "./resources/app/plugin/XMagic/win/${arch}/",
- "filter": ["**/*"],
- },
- {
- "from": "node_modules/trtc-electron-plugin-xmagic/plugin/XMagic/win/res/",
- "to": "./resources/app/plugin/XMagic/win/res/",
- "filter": ["**/*"],
- },
],
"target": ["nsis", "zip"],
},
diff --git a/main.js b/main.js
index 47ee1e1..c797ee3 100644
--- a/main.js
+++ b/main.js
@@ -1,4 +1,4 @@
-const { app, ipcMain } = require('electron');
+const { app, ipcMain, globalShortcut, Menu } = require('electron');
const { TUILiveKitMain } = require('./TUILiveKit.main');
function quitApplication() {
@@ -15,7 +15,65 @@ ipcMain.on('openTUILiveKit', (event, args) => {
TUILiveKitMain.on('closed', quitApplication);
});
+function registerDisableRefreshShortcuts() {
+ const shortcuts = [
+ 'CommandOrControl+R',
+ 'CommandOrControl+Shift+R',
+ 'F5',
+ ];
+ shortcuts.forEach((shortcut) => {
+ const ok = globalShortcut.register(shortcut, () => {
+ console.log(`[main.js]blocked refresh shortcut: ${shortcut}`);
+ });
+ if (!ok) {
+ console.warn(`[main.js]failed to register shortcut: ${shortcut}`);
+ }
+ });
+}
+
+function setupApplicationMenuWithoutReload() {
+ const template = [];
+
+ if (process.platform === 'darwin') {
+ template.push({
+ label: app.name,
+ submenu: [
+ { role: 'about' },
+ { type: 'separator' },
+ { role: 'services' },
+ { type: 'separator' },
+ { role: 'hide' },
+ { role: 'hideOthers' },
+ { role: 'unhide' },
+ { type: 'separator' },
+ { role: 'quit' },
+ ],
+ });
+ }
+
+ template.push(
+ { role: 'editMenu' },
+ {
+ label: 'View',
+ submenu: [
+ // Intentionally keep zoom/fullscreen/devtools, but remove reload/forceReload.
+ { role: 'resetZoom' },
+ { role: 'zoomIn' },
+ { role: 'zoomOut' },
+ { type: 'separator' },
+ { role: 'toggleDevTools' },
+ { role: 'togglefullscreen' },
+ ],
+ },
+ { role: 'windowMenu' }
+ );
+
+ Menu.setApplicationMenu(Menu.buildFromTemplate(template));
+}
+
app.whenReady().then(() => {
+ registerDisableRefreshShortcuts();
+ setupApplicationMenuWithoutReload();
TUILiveKitMain.open();
});
@@ -25,4 +83,8 @@ app.on('window-all-closed', () => {
app.on('activate', () => {
TUILiveKitMain.open();
-});
\ No newline at end of file
+});
+
+app.on('will-quit', () => {
+ globalShortcut.unregisterAll();
+});
diff --git a/package.json b/package.json
index a7e4b8a..86c3ca6 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "ultra-live-electron",
- "version": "5.5.2",
+ "version": "5.8.2",
"description": "Tencent Cloud Living and Streaming Tool for desktop and laptop",
"main": "main.js",
"author": "Tencent Cloud",
@@ -23,9 +23,9 @@
"start:with-upload-server": "concurrently \"npm run serve\" \"npm run upload-server\" \"npm run electron\""
},
"dependencies": {
- "@tencentcloud/tuiroom-engine-electron": "~4.0.1",
- "@tencentcloud/uikit-base-component-vue3": "1.3.7",
- "tuikit-atomicx-vue3-electron": "5.5.2",
+ "@tencentcloud/tuiroom-engine-electron": "~4.0.2",
+ "@tencentcloud/uikit-base-component-vue3": "1.4.1",
+ "tuikit-atomicx-vue3-electron": "5.8.2",
"core-js": "^3.36.1",
"movable-resizable-js": "^0.2.0",
"pinia": "^2.1.7",
diff --git a/scripts/check-dialog-i18n.js b/scripts/check-dialog-i18n.js
new file mode 100644
index 0000000..488fa3f
--- /dev/null
+++ b/scripts/check-dialog-i18n.js
@@ -0,0 +1,219 @@
+/* eslint-disable no-console */
+const fs = require('node:fs');
+const path = require('node:path');
+const { parse, compileTemplate } = require('vue/compiler-sfc');
+
+const projectRoot = path.resolve(__dirname, '..');
+const srcDir = path.join(projectRoot, 'src');
+
+function walk(dir) {
+ if (!fs.existsSync(dir)) {
+ return [];
+ }
+ const entries = fs.readdirSync(dir, { withFileTypes: true });
+ const out = [];
+ entries.forEach((entry) => {
+ const fullPath = path.join(dir, entry.name);
+ if (entry.isDirectory()) {
+ out.push(...walk(fullPath));
+ return;
+ }
+ if (entry.isFile() && fullPath.endsWith('.vue')) {
+ out.push(fullPath);
+ }
+ });
+ return out;
+}
+
+function walkTemplateNodes(nodeOrNodes, visitor) {
+ if (!nodeOrNodes) {
+ return;
+ }
+
+ if (Array.isArray(nodeOrNodes)) {
+ nodeOrNodes.forEach((node) => walkTemplateNodes(node, visitor));
+ return;
+ }
+
+ const node = nodeOrNodes;
+ switch (node.type) {
+ case 0: // Root
+ walkTemplateNodes(node.children, visitor);
+ break;
+ case 1: // Element
+ visitor(node);
+ walkTemplateNodes(node.children, visitor);
+ break;
+ case 9: // If
+ (node.branches || []).forEach((branch) => walkTemplateNodes(branch, visitor));
+ break;
+ case 10: // IfBranch
+ walkTemplateNodes(node.children, visitor);
+ break;
+ case 11: // For
+ walkTemplateNodes(node.children, visitor);
+ break;
+ default:
+ break;
+ }
+}
+
+function hasDialogTextProp(dialogNode, names) {
+ for (const prop of dialogNode.props || []) {
+ if (prop.type === 6 && names.has(prop.name)) {
+ return true;
+ }
+
+ if (
+ prop.type === 7
+ && prop.name === 'bind'
+ && prop.arg
+ && prop.arg.type === 4
+ && names.has(prop.arg.content)
+ ) {
+ return true;
+ }
+ }
+ return false;
+}
+
+function isFooterSlotTemplate(node) {
+ for (const prop of node.props || []) {
+ if (prop.type === 6 && prop.name === 'slot' && prop.value && prop.value.content === 'footer') {
+ return true;
+ }
+
+ if (
+ prop.type === 7
+ && prop.name === 'slot'
+ && prop.arg
+ && prop.arg.type === 4
+ && prop.arg.content === 'footer'
+ ) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+function hasFooterSlot(dialogNode) {
+ let found = false;
+ walkTemplateNodes(dialogNode.children || [], (node) => {
+ if (found) {
+ return;
+ }
+ if (node.tag === 'template' && isFooterSlotTemplate(node)) {
+ found = true;
+ }
+ });
+ return found;
+}
+
+function getLineNumberByOffset(source, offset) {
+ return source.slice(0, offset).split('\n').length;
+}
+
+function isIgnorableSfcParseError(error) {
+ return String(error).includes('At least one or
-
diff --git a/src/TUILiveKit/ConfirmView.vue b/src/TUILiveKit/ConfirmView.vue
deleted file mode 100644
index d2b91da..0000000
--- a/src/TUILiveKit/ConfirmView.vue
+++ /dev/null
@@ -1,194 +0,0 @@
-
-
-
-
- {{ content }}
-
-
-
-
-
-
-
-
diff --git a/src/TUILiveKit/MainCoverView.vue b/src/TUILiveKit/MainCoverView.vue
deleted file mode 100644
index b1951c2..0000000
--- a/src/TUILiveKit/MainCoverView.vue
+++ /dev/null
@@ -1,124 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/TUILiveKit/MainView.vue b/src/TUILiveKit/MainView.vue
deleted file mode 100644
index c3c40a2..0000000
--- a/src/TUILiveKit/MainView.vue
+++ /dev/null
@@ -1,1158 +0,0 @@
-
-
-
-
-
-
-
diff --git a/src/TUILiveKit/common/AudioControl.vue b/src/TUILiveKit/common/AudioControl.vue
deleted file mode 100644
index 29e8e39..0000000
--- a/src/TUILiveKit/common/AudioControl.vue
+++ /dev/null
@@ -1,96 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/src/TUILiveKit/common/AudioSettingTab.vue b/src/TUILiveKit/common/AudioSettingTab.vue
deleted file mode 100644
index 34a03f6..0000000
--- a/src/TUILiveKit/common/AudioSettingTab.vue
+++ /dev/null
@@ -1,261 +0,0 @@
-
-
-
-
{{ t('Mic') }}
-
-
-
- {{ isTestingMicrophone ? t('Stop') : t('Test') }}
-
-
-
-
-
-
{{ t('Speaker') }}
-
-
-
- {{ isTestingSpeaker ? t('Stop') : t('Test') }}
-
-
-
-
-
-
-
-
-
-
diff --git a/src/TUILiveKit/common/BeautyConfigPanel.vue b/src/TUILiveKit/common/BeautyConfigPanel.vue
deleted file mode 100644
index 03ad12a..0000000
--- a/src/TUILiveKit/common/BeautyConfigPanel.vue
+++ /dev/null
@@ -1,584 +0,0 @@
-
-
-
- {{ currentBeautyProperty.label }}
-
- {{ currentBeautyProperty.effValue }}
-
-
-
-
-
-
- -
-
- {{ item.label }}
-
-
-
-
-
- -
-
- {{ item.label }}
-
-
-
-
-
- -
-
- {{ item.label }}
-
-
-
-
-
- -
-
- {{ item.label }}
-
-
-
-
-
-
{{ item.label }}
-
- -
-
- {{ option.label }}
-
-
-
-
-
-
- -
-
- {{ item.label }}
-
-
-
-
-
- -
-
- {{ item.label }}
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/DeviceSelect.vue b/src/TUILiveKit/common/DeviceSelect.vue
deleted file mode 100644
index e08ead6..0000000
--- a/src/TUILiveKit/common/DeviceSelect.vue
+++ /dev/null
@@ -1,113 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/src/TUILiveKit/common/SpeakerControl.vue b/src/TUILiveKit/common/SpeakerControl.vue
deleted file mode 100644
index 49c41b1..0000000
--- a/src/TUILiveKit/common/SpeakerControl.vue
+++ /dev/null
@@ -1,92 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/src/TUILiveKit/common/VideoProfile.vue b/src/TUILiveKit/common/VideoProfile.vue
deleted file mode 100644
index e069c59..0000000
--- a/src/TUILiveKit/common/VideoProfile.vue
+++ /dev/null
@@ -1,72 +0,0 @@
-
-
-
-
-
-
-
diff --git a/src/TUILiveKit/common/VideoSettingTab.vue b/src/TUILiveKit/common/VideoSettingTab.vue
deleted file mode 100644
index 2760f91..0000000
--- a/src/TUILiveKit/common/VideoSettingTab.vue
+++ /dev/null
@@ -1,337 +0,0 @@
-
-
-
-
-
-
- {{ t('Camera') }}
-
-
-
- {{ t('Resolution') }}
-
-
-
-
-
-
-
-
-
-
-
- {{t('Color Space')}}
-
-
-
-
-
- {{t('Color Range')}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/TUILiveKit/common/base/Badge.vue b/src/TUILiveKit/common/base/Badge.vue
deleted file mode 100644
index 01c7deb..0000000
--- a/src/TUILiveKit/common/base/Badge.vue
+++ /dev/null
@@ -1,76 +0,0 @@
-
-
-
- {{ content }}
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/base/ColorPicker.vue b/src/TUILiveKit/common/base/ColorPicker.vue
deleted file mode 100644
index 664c654..0000000
--- a/src/TUILiveKit/common/base/ColorPicker.vue
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/base/Dialog/Index.vue b/src/TUILiveKit/common/base/Dialog/Index.vue
deleted file mode 100644
index 7d76931..0000000
--- a/src/TUILiveKit/common/base/Dialog/Index.vue
+++ /dev/null
@@ -1,363 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/TUILiveKit/common/base/Dialog/README.md b/src/TUILiveKit/common/base/Dialog/README.md
deleted file mode 100644
index cba9905..0000000
--- a/src/TUILiveKit/common/base/Dialog/README.md
+++ /dev/null
@@ -1,142 +0,0 @@
-# TUIDialog 组件
-
-一个基于 Vue 3 的对话框组件,支持组件式和函数式两种调用方式。
-
-## 特性
-
-- 🎨 与项目设计系统完全一致的样式
-- 🚀 支持组件式和函数式调用
-- 🎭 支持遮罩层点击关闭
-- 📱 响应式设计,支持移动端
-- 🎬 流畅的动画效果
-- 🔧 高度可定制化
-
-## 组件式使用
-
-```vue
-
-
- 这里是对话框内容
-
-
-
-
-```
-
-## 函数式使用
-
-### 基础对话框
-
-```javascript
-import { dialog } from '@/common/base/Dialog';
-
-const instance = dialog({
- title: '提示',
- content: '这是一个对话框',
- onConfirm: () => {
- console.log('确认');
- },
- onCancel: () => {
- console.log('取消');
- }
-});
-
-// 手动关闭
-instance.close();
-```
-
-### 快捷方法
-
-```javascript
-import { confirm, alert, info, success, warning, error } from '@/common/base/Dialog';
-
-// 确认对话框
-confirm({
- title: '删除确认',
- content: '确定要删除这个项目吗?',
- onConfirm: () => {
- // 执行删除操作
- }
-});
-
-// 警告对话框
-alert({
- title: '警告',
- content: '操作不可逆,请谨慎操作!'
-});
-
-// 信息提示
-info('操作成功完成!');
-success('数据保存成功!');
-warning('请检查输入信息!');
-error('操作失败,请重试!');
-```
-
-## Props
-
-| 属性 | 类型 | 默认值 | 说明 |
-|------|------|--------|------|
-| visible | boolean | false | 是否显示对话框 |
-| title | string | '' | 对话框标题 |
-| width | string \| number | '28rem' | 对话框宽度 |
-| height | string \| number | 'auto' | 对话框高度 |
-| maxWidth | string \| number | '90vw' | 最大宽度 |
-| maxHeight | string \| number | '80vh' | 最大高度 |
-| closable | boolean | true | 是否显示关闭按钮 |
-| maskClosable | boolean | true | 点击遮罩层是否关闭 |
-| showFooter | boolean | true | 是否显示底部按钮 |
-| confirmText | string | 'Confirm' | 确认按钮文字 |
-| cancelText | string | 'Cancel' | 取消按钮文字 |
-| confirmLoading | boolean | false | 确认按钮加载状态 |
-| destroyOnClose | boolean | false | 关闭时是否销毁 |
-| zIndex | number | 1000 | 层级 |
-| customClass | string | '' | 自定义样式类 |
-
-## Events
-
-| 事件名 | 说明 | 参数 |
-|--------|------|------|
-| update:visible | 显示状态改变 | (visible: boolean) |
-| confirm | 点击确认按钮 | - |
-| cancel | 点击取消按钮 | - |
-| close | 对话框关闭 | - |
-
-## Slots
-
-| 插槽名 | 说明 |
-|--------|------|
-| default | 对话框内容 |
-| footer | 自定义底部内容 |
-
-## 样式定制
-
-组件使用 CSS 变量,可以通过覆盖变量来定制样式:
-
-```css
-:root {
- --bg-color-operate: #1F2024;
- --stroke-color-primary: #3A3C42;
- --text-color-primary: #FFFFFF;
- --button-color-primary-default: #006EFF;
- --button-color-primary-hover: #0056CC;
-}
-```
\ No newline at end of file
diff --git a/src/TUILiveKit/common/base/Dialog/dialog.ts b/src/TUILiveKit/common/base/Dialog/dialog.ts
deleted file mode 100644
index 6ecd815..0000000
--- a/src/TUILiveKit/common/base/Dialog/dialog.ts
+++ /dev/null
@@ -1,170 +0,0 @@
-import { createApp, App } from 'vue';
-import DialogComponent from './Index.vue';
-
-export interface DialogOptions {
- title?: string;
- content?: string;
- width?: string | number;
- height?: string | number;
- maxWidth?: string | number;
- maxHeight?: string | number;
- closable?: boolean;
- maskClosable?: boolean;
- showFooter?: boolean;
- confirmText?: string;
- cancelText?: string;
- confirmLoading?: boolean;
- destroyOnClose?: boolean;
- zIndex?: number;
- customClass?: string;
- onConfirm?: () => void | Promise;
- onCancel?: () => void;
- onClose?: () => void;
-}
-
-export interface DialogInstance {
- close: () => void;
- destroy: () => void;
-}
-
-let dialogId = 0;
-
-export function dialog(options: DialogOptions): DialogInstance {
- const id = `dialog-${++dialogId}`;
- const container = document.createElement('div');
- container.id = id;
- document.body.appendChild(container);
-
- let app: App | null = null;
- let isDestroyed = false;
-
- const instance: DialogInstance = {
- close() {
- if (isDestroyed) return;
-
- if (app) {
- app.unmount();
- app = null;
- }
-
- const element = document.getElementById(id);
- if (element && element.parentNode) {
- element.parentNode.removeChild(element);
- }
-
- isDestroyed = true;
-
- if (options.onClose) {
- options.onClose();
- }
- },
-
- destroy() {
- this.close();
- }
- };
-
- const props = {
- visible: true,
- title: options.title || '',
- width: options.width || '28rem',
- height: options.height || 'auto',
- maxWidth: options.maxWidth || '90vw',
- maxHeight: options.maxHeight || '80vh',
- closable: options.closable !== false,
- maskClosable: options.maskClosable !== false,
- showFooter: options.showFooter !== false,
- confirmText: options.confirmText || 'Confirm',
- cancelText: options.cancelText || 'Cancel',
- confirmLoading: options.confirmLoading || false,
- destroyOnClose: options.destroyOnClose !== false,
- zIndex: options.zIndex || 1000,
- customClass: options.customClass || '',
- };
-
- app = createApp(DialogComponent, {
- ...props,
- content: options.content || '',
- onConfirm: async () => {
- if (options.onConfirm) {
- try {
- await options.onConfirm();
- instance.close();
- } catch (error) {
- console.error('Dialog confirm error:', error);
- }
- } else {
- instance.close();
- }
- },
- onCancel: () => {
- if (options.onCancel) {
- options.onCancel();
- }
- instance.close();
- },
- onClose: () => {
- instance.close();
- },
- 'onUpdate:visible': (visible: boolean) => {
- if (!visible) {
- instance.close();
- }
- }
- });
-
- app.mount(container);
-
- return instance;
-}
-
-export const confirm = (options: DialogOptions): DialogInstance => {
- return dialog({
- ...options,
- showFooter: true,
- });
-};
-
-export const alert = (options: DialogOptions): DialogInstance => {
- return dialog({
- ...options,
- showFooter: true,
- cancelText: '',
- });
-};
-
-export const info = (content: string, title?: string): DialogInstance => {
- return dialog({
- content,
- title: title || 'Information',
- showFooter: true,
- cancelText: '',
- });
-};
-
-export const success = (content: string, title?: string): DialogInstance => {
- return dialog({
- content,
- title: title || 'Success',
- showFooter: true,
- cancelText: '',
- });
-};
-
-export const warning = (content: string, title?: string): DialogInstance => {
- return dialog({
- content,
- title: title || 'Warning',
- showFooter: true,
- cancelText: '',
- });
-};
-
-export const error = (content: string, title?: string): DialogInstance => {
- return dialog({
- content,
- title: title || 'Error',
- showFooter: true,
- cancelText: '',
- });
-};
\ No newline at end of file
diff --git a/src/TUILiveKit/common/base/Dialog/example.vue b/src/TUILiveKit/common/base/Dialog/example.vue
deleted file mode 100644
index b0a8cdf..0000000
--- a/src/TUILiveKit/common/base/Dialog/example.vue
+++ /dev/null
@@ -1,153 +0,0 @@
-
-
-
TUIDialog 使用示例
-
-
-
组件式调用
-
-
-
- 这是一个使用组件方式调用的对话框。
- 您可以在这里放置任何内容。
-
-
-
-
-
函数式调用
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/base/Dialog/index.ts b/src/TUILiveKit/common/base/Dialog/index.ts
deleted file mode 100644
index df0951d..0000000
--- a/src/TUILiveKit/common/base/Dialog/index.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import Dialog from './Index.vue';
-export * from './type';
-export {
- dialog,
- confirm,
- alert,
- info,
- success,
- warning,
- error
-} from './dialog';
-export const TUIDialog = Dialog;
-export default Dialog;
diff --git a/src/TUILiveKit/common/base/Dialog/type.ts b/src/TUILiveKit/common/base/Dialog/type.ts
deleted file mode 100644
index 4352bf7..0000000
--- a/src/TUILiveKit/common/base/Dialog/type.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-export interface DialogProps {
- visible?: boolean;
- title?: string;
- width?: string | number;
- height?: string | number;
- maxWidth?: string | number;
- maxHeight?: string | number;
- closable?: boolean;
- maskClosable?: boolean;
- showFooter?: boolean;
- confirmText?: string;
- cancelText?: string;
- confirmLoading?: boolean;
- destroyOnClose?: boolean;
- zIndex?: number;
- customClass?: string;
-}
-
-export interface DialogEmits {
- (e: 'update:visible', visible: boolean): void;
- (e: 'confirm'): void;
- (e: 'cancel'): void;
- (e: 'close'): void;
-}
-
-export interface DialogOptions extends Omit {
- content?: string;
- onConfirm?: () => void | Promise;
- onCancel?: () => void;
- onClose?: () => void;
-}
-
-export interface DialogInstance {
- close: () => void;
- destroy: () => void;
-}
\ No newline at end of file
diff --git a/src/TUILiveKit/common/base/Option.vue b/src/TUILiveKit/common/base/Option.vue
deleted file mode 100644
index 920219b..0000000
--- a/src/TUILiveKit/common/base/Option.vue
+++ /dev/null
@@ -1,76 +0,0 @@
-
-
- {{ label || value }}
-
-
-
-
-
-
diff --git a/src/TUILiveKit/common/base/Select.vue b/src/TUILiveKit/common/base/Select.vue
deleted file mode 100644
index 4eafc8c..0000000
--- a/src/TUILiveKit/common/base/Select.vue
+++ /dev/null
@@ -1,224 +0,0 @@
-
-
-
-
- {{ selectedLabel || selectedValue }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/TUILiveKit/common/base/Slider.vue b/src/TUILiveKit/common/base/Slider.vue
deleted file mode 100644
index 5a223c2..0000000
--- a/src/TUILiveKit/common/base/Slider.vue
+++ /dev/null
@@ -1,137 +0,0 @@
-
-
-
-
-
-
diff --git a/src/TUILiveKit/common/base/Switch.vue b/src/TUILiveKit/common/base/Switch.vue
deleted file mode 100644
index 4ab4f03..0000000
--- a/src/TUILiveKit/common/base/Switch.vue
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
- {{ props.label }}
-
-
-
-
-
-
-
diff --git a/src/TUILiveKit/common/icons/AddIcon.vue b/src/TUILiveKit/common/icons/AddIcon.vue
deleted file mode 100644
index 6c84845..0000000
--- a/src/TUILiveKit/common/icons/AddIcon.vue
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/AddMusicIcon.vue b/src/TUILiveKit/common/icons/AddMusicIcon.vue
deleted file mode 100644
index f64a705..0000000
--- a/src/TUILiveKit/common/icons/AddMusicIcon.vue
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/AddShareScreenIcon.vue b/src/TUILiveKit/common/icons/AddShareScreenIcon.vue
deleted file mode 100644
index c326323..0000000
--- a/src/TUILiveKit/common/icons/AddShareScreenIcon.vue
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/AddVideo.vue b/src/TUILiveKit/common/icons/AddVideo.vue
deleted file mode 100644
index 98979e7..0000000
--- a/src/TUILiveKit/common/icons/AddVideo.vue
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
diff --git a/src/TUILiveKit/common/icons/ArrowDownIcon.vue b/src/TUILiveKit/common/icons/ArrowDownIcon.vue
deleted file mode 100644
index 4927aad..0000000
--- a/src/TUILiveKit/common/icons/ArrowDownIcon.vue
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/ArrowDownRotateIcon.vue b/src/TUILiveKit/common/icons/ArrowDownRotateIcon.vue
deleted file mode 100644
index d3a13b8..0000000
--- a/src/TUILiveKit/common/icons/ArrowDownRotateIcon.vue
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/ArrowSetUpIcon.vue b/src/TUILiveKit/common/icons/ArrowSetUpIcon.vue
deleted file mode 100644
index 90a585f..0000000
--- a/src/TUILiveKit/common/icons/ArrowSetUpIcon.vue
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/ArrowStrokeSelectDownIcon.vue b/src/TUILiveKit/common/icons/ArrowStrokeSelectDownIcon.vue
deleted file mode 100644
index 5427fe4..0000000
--- a/src/TUILiveKit/common/icons/ArrowStrokeSelectDownIcon.vue
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
diff --git a/src/TUILiveKit/common/icons/ArrowUpIcon.vue b/src/TUILiveKit/common/icons/ArrowUpIcon.vue
deleted file mode 100644
index a1be3bf..0000000
--- a/src/TUILiveKit/common/icons/ArrowUpIcon.vue
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/AudioEffIcon.vue b/src/TUILiveKit/common/icons/AudioEffIcon.vue
deleted file mode 100644
index f05d292..0000000
--- a/src/TUILiveKit/common/icons/AudioEffIcon.vue
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/AudioIcon.vue b/src/TUILiveKit/common/icons/AudioIcon.vue
deleted file mode 100644
index 33a7b2e..0000000
--- a/src/TUILiveKit/common/icons/AudioIcon.vue
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/BGMIcon.vue b/src/TUILiveKit/common/icons/BGMIcon.vue
deleted file mode 100644
index bd37c8c..0000000
--- a/src/TUILiveKit/common/icons/BGMIcon.vue
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
diff --git a/src/TUILiveKit/common/icons/BeautyIcon.vue b/src/TUILiveKit/common/icons/BeautyIcon.vue
deleted file mode 100644
index 3546895..0000000
--- a/src/TUILiveKit/common/icons/BeautyIcon.vue
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/BlacklistIcon.vue b/src/TUILiveKit/common/icons/BlacklistIcon.vue
deleted file mode 100644
index 08ceb7f..0000000
--- a/src/TUILiveKit/common/icons/BlacklistIcon.vue
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/BottomBarIcon.vue b/src/TUILiveKit/common/icons/BottomBarIcon.vue
deleted file mode 100644
index 3371c1a..0000000
--- a/src/TUILiveKit/common/icons/BottomBarIcon.vue
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/CameraIcon.vue b/src/TUILiveKit/common/icons/CameraIcon.vue
deleted file mode 100644
index 9b4fda8..0000000
--- a/src/TUILiveKit/common/icons/CameraIcon.vue
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/CameraMirror.vue b/src/TUILiveKit/common/icons/CameraMirror.vue
deleted file mode 100644
index d58366e..0000000
--- a/src/TUILiveKit/common/icons/CameraMirror.vue
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/CameraUnmirror.vue b/src/TUILiveKit/common/icons/CameraUnmirror.vue
deleted file mode 100644
index f5aeaeb..0000000
--- a/src/TUILiveKit/common/icons/CameraUnmirror.vue
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/CancelMikeIcon.vue b/src/TUILiveKit/common/icons/CancelMikeIcon.vue
deleted file mode 100644
index c38a4d9..0000000
--- a/src/TUILiveKit/common/icons/CancelMikeIcon.vue
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/ChangeVoiceIcon.vue b/src/TUILiveKit/common/icons/ChangeVoiceIcon.vue
deleted file mode 100644
index dc797bc..0000000
--- a/src/TUILiveKit/common/icons/ChangeVoiceIcon.vue
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
diff --git a/src/TUILiveKit/common/icons/ChangeVoiceIcons/ForeignLanguagesIcon.vue b/src/TUILiveKit/common/icons/ChangeVoiceIcons/ForeignLanguagesIcon.vue
deleted file mode 100644
index f3bb971..0000000
--- a/src/TUILiveKit/common/icons/ChangeVoiceIcons/ForeignLanguagesIcon.vue
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/ChangeVoiceIcons/HeavyCurrentIcon.vue b/src/TUILiveKit/common/icons/ChangeVoiceIcons/HeavyCurrentIcon.vue
deleted file mode 100644
index 64a1596..0000000
--- a/src/TUILiveKit/common/icons/ChangeVoiceIcons/HeavyCurrentIcon.vue
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/ChangeVoiceIcons/HeavyMachineryIcon.vue b/src/TUILiveKit/common/icons/ChangeVoiceIcons/HeavyMachineryIcon.vue
deleted file mode 100644
index f2c8662..0000000
--- a/src/TUILiveKit/common/icons/ChangeVoiceIcons/HeavyMachineryIcon.vue
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/ChangeVoiceIcons/HeavyMetalIcon.vue b/src/TUILiveKit/common/icons/ChangeVoiceIcons/HeavyMetalIcon.vue
deleted file mode 100644
index c2bcb17..0000000
--- a/src/TUILiveKit/common/icons/ChangeVoiceIcons/HeavyMetalIcon.vue
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/ChangeVoiceIcons/InfluenzaIcon.vue b/src/TUILiveKit/common/icons/ChangeVoiceIcons/InfluenzaIcon.vue
deleted file mode 100644
index 551145a..0000000
--- a/src/TUILiveKit/common/icons/ChangeVoiceIcons/InfluenzaIcon.vue
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/ChangeVoiceIcons/IntangibleIcon.vue b/src/TUILiveKit/common/icons/ChangeVoiceIcons/IntangibleIcon.vue
deleted file mode 100644
index 6a99891..0000000
--- a/src/TUILiveKit/common/icons/ChangeVoiceIcons/IntangibleIcon.vue
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/ChangeVoiceIcons/LolitaIcon.vue b/src/TUILiveKit/common/icons/ChangeVoiceIcons/LolitaIcon.vue
deleted file mode 100644
index 77b55d5..0000000
--- a/src/TUILiveKit/common/icons/ChangeVoiceIcons/LolitaIcon.vue
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/ChangeVoiceIcons/NaughtyKidIcon.vue b/src/TUILiveKit/common/icons/ChangeVoiceIcons/NaughtyKidIcon.vue
deleted file mode 100644
index a57ceec..0000000
--- a/src/TUILiveKit/common/icons/ChangeVoiceIcons/NaughtyKidIcon.vue
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/ChangeVoiceIcons/OriginVoiceIcon.vue b/src/TUILiveKit/common/icons/ChangeVoiceIcons/OriginVoiceIcon.vue
deleted file mode 100644
index d0e4f08..0000000
--- a/src/TUILiveKit/common/icons/ChangeVoiceIcons/OriginVoiceIcon.vue
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/ChangeVoiceIcons/PlumpIcon.vue b/src/TUILiveKit/common/icons/ChangeVoiceIcons/PlumpIcon.vue
deleted file mode 100644
index 6d6af8a..0000000
--- a/src/TUILiveKit/common/icons/ChangeVoiceIcons/PlumpIcon.vue
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/ChangeVoiceIcons/TrappedBeastIcon.vue b/src/TUILiveKit/common/icons/ChangeVoiceIcons/TrappedBeastIcon.vue
deleted file mode 100644
index ad8fe56..0000000
--- a/src/TUILiveKit/common/icons/ChangeVoiceIcons/TrappedBeastIcon.vue
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/ChangeVoiceIcons/UncleIcon.vue b/src/TUILiveKit/common/icons/ChangeVoiceIcons/UncleIcon.vue
deleted file mode 100644
index 5a38e23..0000000
--- a/src/TUILiveKit/common/icons/ChangeVoiceIcons/UncleIcon.vue
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/CloseCameraIcon.vue b/src/TUILiveKit/common/icons/CloseCameraIcon.vue
deleted file mode 100644
index b05ecb8..0000000
--- a/src/TUILiveKit/common/icons/CloseCameraIcon.vue
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/DeleteMusicIcon.vue b/src/TUILiveKit/common/icons/DeleteMusicIcon.vue
deleted file mode 100644
index 34dbf14..0000000
--- a/src/TUILiveKit/common/icons/DeleteMusicIcon.vue
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/DermabrasionBeautyIcon.vue b/src/TUILiveKit/common/icons/DermabrasionBeautyIcon.vue
deleted file mode 100644
index fb91495..0000000
--- a/src/TUILiveKit/common/icons/DermabrasionBeautyIcon.vue
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/DownIcon.vue b/src/TUILiveKit/common/icons/DownIcon.vue
deleted file mode 100644
index d5870da..0000000
--- a/src/TUILiveKit/common/icons/DownIcon.vue
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/EditIcon.vue b/src/TUILiveKit/common/icons/EditIcon.vue
deleted file mode 100644
index 0f1175d..0000000
--- a/src/TUILiveKit/common/icons/EditIcon.vue
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
diff --git a/src/TUILiveKit/common/icons/EmojiIcon.vue b/src/TUILiveKit/common/icons/EmojiIcon.vue
deleted file mode 100644
index 0be1528..0000000
--- a/src/TUILiveKit/common/icons/EmojiIcon.vue
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/EndLivingIcon.vue b/src/TUILiveKit/common/icons/EndLivingIcon.vue
deleted file mode 100644
index 26bf3c2..0000000
--- a/src/TUILiveKit/common/icons/EndLivingIcon.vue
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/ErrorIcon.vue b/src/TUILiveKit/common/icons/ErrorIcon.vue
deleted file mode 100644
index c22eee6..0000000
--- a/src/TUILiveKit/common/icons/ErrorIcon.vue
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
diff --git a/src/TUILiveKit/common/icons/FloridBeautyIcon.vue b/src/TUILiveKit/common/icons/FloridBeautyIcon.vue
deleted file mode 100644
index cb162e1..0000000
--- a/src/TUILiveKit/common/icons/FloridBeautyIcon.vue
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/GiftCountIcon.vue b/src/TUILiveKit/common/icons/GiftCountIcon.vue
deleted file mode 100644
index 55ead10..0000000
--- a/src/TUILiveKit/common/icons/GiftCountIcon.vue
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
diff --git a/src/TUILiveKit/common/icons/GiftValueIcon.vue b/src/TUILiveKit/common/icons/GiftValueIcon.vue
deleted file mode 100644
index eeb800d..0000000
--- a/src/TUILiveKit/common/icons/GiftValueIcon.vue
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
diff --git a/src/TUILiveKit/common/icons/HorizontalScreenIcon.vue b/src/TUILiveKit/common/icons/HorizontalScreenIcon.vue
deleted file mode 100644
index 491a88b..0000000
--- a/src/TUILiveKit/common/icons/HorizontalScreenIcon.vue
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/KickedIcon.vue b/src/TUILiveKit/common/icons/KickedIcon.vue
deleted file mode 100644
index b1150a8..0000000
--- a/src/TUILiveKit/common/icons/KickedIcon.vue
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/LanguageIcon.vue b/src/TUILiveKit/common/icons/LanguageIcon.vue
new file mode 100644
index 0000000..a58c277
--- /dev/null
+++ b/src/TUILiveKit/common/icons/LanguageIcon.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
diff --git a/src/TUILiveKit/common/icons/LayoutSettingIcon.vue b/src/TUILiveKit/common/icons/LayoutSettingIcon.vue
deleted file mode 100644
index 43585b0..0000000
--- a/src/TUILiveKit/common/icons/LayoutSettingIcon.vue
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
diff --git a/src/TUILiveKit/common/icons/LinkMicIcon.vue b/src/TUILiveKit/common/icons/LinkMicIcon.vue
deleted file mode 100644
index 4b10b0f..0000000
--- a/src/TUILiveKit/common/icons/LinkMicIcon.vue
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
diff --git a/src/TUILiveKit/common/icons/MailIcon.vue b/src/TUILiveKit/common/icons/MailIcon.vue
deleted file mode 100644
index b41cbc6..0000000
--- a/src/TUILiveKit/common/icons/MailIcon.vue
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
diff --git a/src/TUILiveKit/common/icons/MediaSourceMute.vue b/src/TUILiveKit/common/icons/MediaSourceMute.vue
deleted file mode 100644
index 2a2a90a..0000000
--- a/src/TUILiveKit/common/icons/MediaSourceMute.vue
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/MediaSourceUnmute.vue b/src/TUILiveKit/common/icons/MediaSourceUnmute.vue
deleted file mode 100644
index 2be685a..0000000
--- a/src/TUILiveKit/common/icons/MediaSourceUnmute.vue
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/MicMoreIcon.vue b/src/TUILiveKit/common/icons/MicMoreIcon.vue
deleted file mode 100644
index 0bc309d..0000000
--- a/src/TUILiveKit/common/icons/MicMoreIcon.vue
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/MicOnIcon.vue b/src/TUILiveKit/common/icons/MicOnIcon.vue
deleted file mode 100644
index 26cf41c..0000000
--- a/src/TUILiveKit/common/icons/MicOnIcon.vue
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/MicropositionIcon.vue b/src/TUILiveKit/common/icons/MicropositionIcon.vue
deleted file mode 100644
index fe9d1ea..0000000
--- a/src/TUILiveKit/common/icons/MicropositionIcon.vue
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
diff --git a/src/TUILiveKit/common/icons/MovieIcon.vue b/src/TUILiveKit/common/icons/MovieIcon.vue
deleted file mode 100644
index e4ba41d..0000000
--- a/src/TUILiveKit/common/icons/MovieIcon.vue
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/MusicIcon.vue b/src/TUILiveKit/common/icons/MusicIcon.vue
deleted file mode 100644
index 8468ea6..0000000
--- a/src/TUILiveKit/common/icons/MusicIcon.vue
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/MusicListIcon.vue b/src/TUILiveKit/common/icons/MusicListIcon.vue
deleted file mode 100644
index 81d7fe7..0000000
--- a/src/TUILiveKit/common/icons/MusicListIcon.vue
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/NineSquareGridIcon.vue b/src/TUILiveKit/common/icons/NineSquareGridIcon.vue
deleted file mode 100644
index 6cb3e24..0000000
--- a/src/TUILiveKit/common/icons/NineSquareGridIcon.vue
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/NoBeautyIcon.vue b/src/TUILiveKit/common/icons/NoBeautyIcon.vue
deleted file mode 100644
index 3a18dd9..0000000
--- a/src/TUILiveKit/common/icons/NoBeautyIcon.vue
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/PKIcon.vue b/src/TUILiveKit/common/icons/PKIcon.vue
deleted file mode 100644
index d4a78b1..0000000
--- a/src/TUILiveKit/common/icons/PKIcon.vue
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/PausePlayIcon.vue b/src/TUILiveKit/common/icons/PausePlayIcon.vue
deleted file mode 100644
index bfd6e72..0000000
--- a/src/TUILiveKit/common/icons/PausePlayIcon.vue
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/PlayingIcon.vue b/src/TUILiveKit/common/icons/PlayingIcon.vue
deleted file mode 100644
index b8ed598..0000000
--- a/src/TUILiveKit/common/icons/PlayingIcon.vue
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/PointIcon.vue b/src/TUILiveKit/common/icons/PointIcon.vue
deleted file mode 100644
index f9c5332..0000000
--- a/src/TUILiveKit/common/icons/PointIcon.vue
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/RecordIcon.vue b/src/TUILiveKit/common/icons/RecordIcon.vue
deleted file mode 100644
index c5c86c5..0000000
--- a/src/TUILiveKit/common/icons/RecordIcon.vue
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/RefreshIcon.vue b/src/TUILiveKit/common/icons/RefreshIcon.vue
deleted file mode 100644
index f6b235d..0000000
--- a/src/TUILiveKit/common/icons/RefreshIcon.vue
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
diff --git a/src/TUILiveKit/common/icons/ReverbVoiceIcons/AuditoriumIcon.vue b/src/TUILiveKit/common/icons/ReverbVoiceIcons/AuditoriumIcon.vue
deleted file mode 100644
index 081608a..0000000
--- a/src/TUILiveKit/common/icons/ReverbVoiceIcons/AuditoriumIcon.vue
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
diff --git a/src/TUILiveKit/common/icons/ReverbVoiceIcons/CellIcon.vue b/src/TUILiveKit/common/icons/ReverbVoiceIcons/CellIcon.vue
deleted file mode 100644
index 8d2d62c..0000000
--- a/src/TUILiveKit/common/icons/ReverbVoiceIcons/CellIcon.vue
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/ReverbVoiceIcons/DeepAudioIcon.vue b/src/TUILiveKit/common/icons/ReverbVoiceIcons/DeepAudioIcon.vue
deleted file mode 100644
index 2f32193..0000000
--- a/src/TUILiveKit/common/icons/ReverbVoiceIcons/DeepAudioIcon.vue
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/ReverbVoiceIcons/KTVIcon.vue b/src/TUILiveKit/common/icons/ReverbVoiceIcons/KTVIcon.vue
deleted file mode 100644
index 1573b89..0000000
--- a/src/TUILiveKit/common/icons/ReverbVoiceIcons/KTVIcon.vue
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/ReverbVoiceIcons/MagneticIcon.vue b/src/TUILiveKit/common/icons/ReverbVoiceIcons/MagneticIcon.vue
deleted file mode 100644
index f176aa7..0000000
--- a/src/TUILiveKit/common/icons/ReverbVoiceIcons/MagneticIcon.vue
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/ReverbVoiceIcons/MelodiousIcon.vue b/src/TUILiveKit/common/icons/ReverbVoiceIcons/MelodiousIcon.vue
deleted file mode 100644
index 8b2dfea..0000000
--- a/src/TUILiveKit/common/icons/ReverbVoiceIcons/MelodiousIcon.vue
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/ReverbVoiceIcons/MetallicAudioIcon.vue b/src/TUILiveKit/common/icons/ReverbVoiceIcons/MetallicAudioIcon.vue
deleted file mode 100644
index 3efdd65..0000000
--- a/src/TUILiveKit/common/icons/ReverbVoiceIcons/MetallicAudioIcon.vue
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/ReverbVoiceIcons/NoEffectIcon.vue b/src/TUILiveKit/common/icons/ReverbVoiceIcons/NoEffectIcon.vue
deleted file mode 100644
index 90e87bd..0000000
--- a/src/TUILiveKit/common/icons/ReverbVoiceIcons/NoEffectIcon.vue
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/ReverbVoiceIcons/RecordingRoomIcon.vue b/src/TUILiveKit/common/icons/ReverbVoiceIcons/RecordingRoomIcon.vue
deleted file mode 100644
index 7c285cc..0000000
--- a/src/TUILiveKit/common/icons/ReverbVoiceIcons/RecordingRoomIcon.vue
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
diff --git a/src/TUILiveKit/common/icons/ReverbVoiceIcons/ResonantIcon.vue b/src/TUILiveKit/common/icons/ReverbVoiceIcons/ResonantIcon.vue
deleted file mode 100644
index be72a1e..0000000
--- a/src/TUILiveKit/common/icons/ReverbVoiceIcons/ResonantIcon.vue
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/ReverbVoiceIcons/VacantIcon.vue b/src/TUILiveKit/common/icons/ReverbVoiceIcons/VacantIcon.vue
deleted file mode 100644
index 570a382..0000000
--- a/src/TUILiveKit/common/icons/ReverbVoiceIcons/VacantIcon.vue
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/SeatIcon.vue b/src/TUILiveKit/common/icons/SeatIcon.vue
deleted file mode 100644
index bfa8d80..0000000
--- a/src/TUILiveKit/common/icons/SeatIcon.vue
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/SelectedIcon.vue b/src/TUILiveKit/common/icons/SelectedIcon.vue
deleted file mode 100644
index ae3bcc5..0000000
--- a/src/TUILiveKit/common/icons/SelectedIcon.vue
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/SequentialPlayIcon.vue b/src/TUILiveKit/common/icons/SequentialPlayIcon.vue
deleted file mode 100644
index 56019b0..0000000
--- a/src/TUILiveKit/common/icons/SequentialPlayIcon.vue
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/SetIcon.vue b/src/TUILiveKit/common/icons/SetIcon.vue
deleted file mode 100644
index ef34ed5..0000000
--- a/src/TUILiveKit/common/icons/SetIcon.vue
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/ShapeBeautyIcon.vue b/src/TUILiveKit/common/icons/ShapeBeautyIcon.vue
deleted file mode 100644
index c43d508..0000000
--- a/src/TUILiveKit/common/icons/ShapeBeautyIcon.vue
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/ShareScreenIcon.vue b/src/TUILiveKit/common/icons/ShareScreenIcon.vue
deleted file mode 100644
index 1ef7883..0000000
--- a/src/TUILiveKit/common/icons/ShareScreenIcon.vue
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/ShortBeautyIcon.vue b/src/TUILiveKit/common/icons/ShortBeautyIcon.vue
deleted file mode 100644
index 4514596..0000000
--- a/src/TUILiveKit/common/icons/ShortBeautyIcon.vue
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/SidebarLayoutIcon.vue b/src/TUILiveKit/common/icons/SidebarLayoutIcon.vue
deleted file mode 100644
index 163d05c..0000000
--- a/src/TUILiveKit/common/icons/SidebarLayoutIcon.vue
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/SingleLoopPlayIcon.vue b/src/TUILiveKit/common/icons/SingleLoopPlayIcon.vue
deleted file mode 100644
index 30d27f3..0000000
--- a/src/TUILiveKit/common/icons/SingleLoopPlayIcon.vue
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/SlimmingBeautyIcon.vue b/src/TUILiveKit/common/icons/SlimmingBeautyIcon.vue
deleted file mode 100644
index 9dd2090..0000000
--- a/src/TUILiveKit/common/icons/SlimmingBeautyIcon.vue
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/SoundEffectIcon.vue b/src/TUILiveKit/common/icons/SoundEffectIcon.vue
deleted file mode 100644
index e428946..0000000
--- a/src/TUILiveKit/common/icons/SoundEffectIcon.vue
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/SpeakerLayoutIcon.vue b/src/TUILiveKit/common/icons/SpeakerLayoutIcon.vue
deleted file mode 100644
index 25e415a..0000000
--- a/src/TUILiveKit/common/icons/SpeakerLayoutIcon.vue
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/SpeakerOffIcon.vue b/src/TUILiveKit/common/icons/SpeakerOffIcon.vue
deleted file mode 100644
index 5b3d9a5..0000000
--- a/src/TUILiveKit/common/icons/SpeakerOffIcon.vue
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
diff --git a/src/TUILiveKit/common/icons/SpeakerOnIcon.vue b/src/TUILiveKit/common/icons/SpeakerOnIcon.vue
deleted file mode 100644
index 73cabd2..0000000
--- a/src/TUILiveKit/common/icons/SpeakerOnIcon.vue
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
diff --git a/src/TUILiveKit/common/icons/StartLivingIcon.vue b/src/TUILiveKit/common/icons/StartLivingIcon.vue
deleted file mode 100644
index f6e5ca1..0000000
--- a/src/TUILiveKit/common/icons/StartLivingIcon.vue
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/StartPlayIcon.vue b/src/TUILiveKit/common/icons/StartPlayIcon.vue
deleted file mode 100644
index 9b25aef..0000000
--- a/src/TUILiveKit/common/icons/StartPlayIcon.vue
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/StreamLayoutTemplate/Dynamic1v6Icon.vue b/src/TUILiveKit/common/icons/StreamLayoutTemplate/Dynamic1v6Icon.vue
deleted file mode 100644
index 0799a2a..0000000
--- a/src/TUILiveKit/common/icons/StreamLayoutTemplate/Dynamic1v6Icon.vue
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
diff --git a/src/TUILiveKit/common/icons/StreamLayoutTemplate/DynamicGrid9Icon.vue b/src/TUILiveKit/common/icons/StreamLayoutTemplate/DynamicGrid9Icon.vue
deleted file mode 100644
index 81be113..0000000
--- a/src/TUILiveKit/common/icons/StreamLayoutTemplate/DynamicGrid9Icon.vue
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
diff --git a/src/TUILiveKit/common/icons/StreamLayoutTemplate/Fixed1v6Icon.vue b/src/TUILiveKit/common/icons/StreamLayoutTemplate/Fixed1v6Icon.vue
deleted file mode 100644
index 0e0a956..0000000
--- a/src/TUILiveKit/common/icons/StreamLayoutTemplate/Fixed1v6Icon.vue
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
diff --git a/src/TUILiveKit/common/icons/StreamLayoutTemplate/FixedGrid9Icon.vue b/src/TUILiveKit/common/icons/StreamLayoutTemplate/FixedGrid9Icon.vue
deleted file mode 100644
index 5b08ab5..0000000
--- a/src/TUILiveKit/common/icons/StreamLayoutTemplate/FixedGrid9Icon.vue
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
diff --git a/src/TUILiveKit/common/icons/StreamLayoutTemplate/HorizontalFloatIcon.vue b/src/TUILiveKit/common/icons/StreamLayoutTemplate/HorizontalFloatIcon.vue
deleted file mode 100644
index a8317d8..0000000
--- a/src/TUILiveKit/common/icons/StreamLayoutTemplate/HorizontalFloatIcon.vue
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
diff --git a/src/TUILiveKit/common/icons/SuccessIcon.vue b/src/TUILiveKit/common/icons/SuccessIcon.vue
deleted file mode 100644
index b2c009e..0000000
--- a/src/TUILiveKit/common/icons/SuccessIcon.vue
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
diff --git a/src/TUILiveKit/common/icons/SwitchSourcesMirror.vue b/src/TUILiveKit/common/icons/SwitchSourcesMirror.vue
deleted file mode 100644
index 8121937..0000000
--- a/src/TUILiveKit/common/icons/SwitchSourcesMirror.vue
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/SwitchThemeIcon.vue b/src/TUILiveKit/common/icons/SwitchThemeIcon.vue
deleted file mode 100644
index 9d6414f..0000000
--- a/src/TUILiveKit/common/icons/SwitchThemeIcon.vue
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/TextIcon.vue b/src/TUILiveKit/common/icons/TextIcon.vue
deleted file mode 100644
index bd8743c..0000000
--- a/src/TUILiveKit/common/icons/TextIcon.vue
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/ThreeColumnIcon.vue b/src/TUILiveKit/common/icons/ThreeColumnIcon.vue
deleted file mode 100644
index e76fec9..0000000
--- a/src/TUILiveKit/common/icons/ThreeColumnIcon.vue
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/UnMuteIcon.vue b/src/TUILiveKit/common/icons/UnMuteIcon.vue
deleted file mode 100644
index 55daddd..0000000
--- a/src/TUILiveKit/common/icons/UnMuteIcon.vue
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/UpIcon.vue b/src/TUILiveKit/common/icons/UpIcon.vue
deleted file mode 100644
index ec361cd..0000000
--- a/src/TUILiveKit/common/icons/UpIcon.vue
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/VShapeBeautyIcon.vue b/src/TUILiveKit/common/icons/VShapeBeautyIcon.vue
deleted file mode 100644
index c43d508..0000000
--- a/src/TUILiveKit/common/icons/VShapeBeautyIcon.vue
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/VerticalScreenIcon.vue b/src/TUILiveKit/common/icons/VerticalScreenIcon.vue
deleted file mode 100644
index 3c8d921..0000000
--- a/src/TUILiveKit/common/icons/VerticalScreenIcon.vue
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/VideoIcon.vue b/src/TUILiveKit/common/icons/VideoIcon.vue
deleted file mode 100644
index e19266f..0000000
--- a/src/TUILiveKit/common/icons/VideoIcon.vue
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/ViewProfileIcon.vue b/src/TUILiveKit/common/icons/ViewProfileIcon.vue
deleted file mode 100644
index 586053b..0000000
--- a/src/TUILiveKit/common/icons/ViewProfileIcon.vue
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/VoiceChatIcon.vue b/src/TUILiveKit/common/icons/VoiceChatIcon.vue
deleted file mode 100644
index 1175f7d..0000000
--- a/src/TUILiveKit/common/icons/VoiceChatIcon.vue
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/VoiceEffectIcon.vue b/src/TUILiveKit/common/icons/VoiceEffectIcon.vue
deleted file mode 100644
index 0aa4557..0000000
--- a/src/TUILiveKit/common/icons/VoiceEffectIcon.vue
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/VoiceIcon.vue b/src/TUILiveKit/common/icons/VoiceIcon.vue
deleted file mode 100644
index d5ba12b..0000000
--- a/src/TUILiveKit/common/icons/VoiceIcon.vue
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/common/icons/WhitenBeautyIcon.vue b/src/TUILiveKit/common/icons/WhitenBeautyIcon.vue
deleted file mode 100644
index 9e9e7dc..0000000
--- a/src/TUILiveKit/common/icons/WhitenBeautyIcon.vue
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/TUILiveKit/communication/index.ts b/src/TUILiveKit/communication/index.ts
deleted file mode 100644
index d94d659..0000000
--- a/src/TUILiveKit/communication/index.ts
+++ /dev/null
@@ -1,645 +0,0 @@
-import { TRTCMediaSourceType, TRTCDeviceType } from 'trtc-electron-sdk';
-import { TUIMediaMixingError, TUIMediaSourceViewModel, TUIMusicPlayMode } from '../types';
-import { defaultCameraCaptureWidth, defaultCameraCaptureHeight } from '../constants/tuiConstant';
-import { useAudioEffectStore } from '../store/main/audioEffect';
-import TUIMessageBox from '../common/base/MessageBox';
-import useAudioEffectManager from '../utils/useAudioEffectManager';
-import useDeviceManager from '../utils/useDeviceManager';
-import useMediaMixingManager, { fitMediaSourceToOldRect } from '../utils/useMediaMixingManager';
-import trtcCloud from '../utils/trtcCloud';
-import { TRTCXmagicFactory, XmagicLicense, } from '../utils/beauty';
-import { useI18n } from '../locales/index';
-import onMediaMixingError from '../hooks/useMediaMixingErrorHandler';
-import logger from '../utils/logger';
-
-const audioEffectStore = useAudioEffectStore();
-const deviceManager = useDeviceManager();
-const audioEffectManager = useAudioEffectManager();
-const mediaMixingManager = useMediaMixingManager();
-const {t} = useI18n();
-const logPrefix = '[MainWindow Message Handler]';
-let mediaSourcesStore: any = null;
-let roomStore: any = null;
-
-export const messageChannels: {
- messagePortToChild: MessagePort|null;
- messagePortToCover: MessagePort|null;
- messagePortToConfirm: MessagePort|null;
-} = {
- messagePortToChild: null,
- messagePortToCover: null,
- messagePortToConfirm: null,
-};
-
-export async function addMediaSource(data: Record) {
- const mediaSource: TUIMediaSourceViewModel = {
- sourceName: data.name,
- aliasName: data.name,
- left: 0,
- top: 0,
- muted: false,
- mediaSourceInfo: {
- sourceType: data.type,
- sourceId: data.id,
- zOrder: 1,
- rect: {
- left: 0,
- top: 0,
- right: data.width || defaultCameraCaptureWidth,
- bottom: data.height || defaultCameraCaptureHeight,
- }
- },
- };
- if (data.type === TRTCMediaSourceType.kCamera) {
- mediaSource.resolution = {width: data.width, height: data.height};
- mediaSource.mediaSourceInfo.mirrorType = data.mirrorType;
- mediaSource.colorSpace = data.colorSpace;
- mediaSource.colorRange = data.colorRange;
- if (data.beautyConfig) {
- mediaSource.beautyConfig = data.beautyConfig;
- }
- } else if (data.type === TRTCMediaSourceType.kScreen) {
- mediaSource.screenType = data.screenType;
- } else if (data.type === TRTCMediaSourceType.kPhoneMirror) {
- mediaSource.mirrorParams = {
- frameRate: data.frameRate,
- bitrateKbps: data.bitrateKbps,
- connectType: data.connectType,
- platformType: data.platformType,
- deviceId: data.deviceId,
- deviceName: data.deviceName,
- placeholderImagePath: data.placeholderImagePath,
- };
- if (data.connectType === 0) {
- window.ipcRenderer.send('start-use-driver-installer', data.platformType);
- }
- } else if (data.type === TRTCMediaSourceType.kOnlineVideo) {
- mediaSource.volume = data.volume;
- mediaSource.networkCacheSize = data.networkCacheSize;
- } else if (data.type === TRTCMediaSourceType.kVideoFile) {
- mediaSource.volume = data.volume;
- }
-
- if (mediaSource) {
- logger.log(`${logPrefix}addMediaSource:`, mediaSource);
- try {
- await mediaSourcesStore.addMediaSource(mediaSource);
- await mediaSourcesStore.selectMediaSource(mediaSource);
- } catch (error) {
- onMediaMixingError(error as TUIMediaMixingError);
- }
- }
-}
-
-async function _updateScreenImageMediaSource(data: Record) {
- logger.log(
- `${logPrefix}updateMediaSource predata:`, JSON.stringify(data.predata));
- if (data.id !== data.predata?.mediaSourceInfo.sourceId) {
- const newMediaSource: TUIMediaSourceViewModel = {
- sourceName: data.name,
- aliasName: data.predata.aliasName,
- left: data.predata?.left,
- top: data.predata?.top,
- muted: false,
- mediaSourceInfo: {
- sourceType: data.type,
- sourceId: data.id,
- zOrder: data.predata?.mediaSourceInfo.zOrder,
- rect: fitMediaSourceToOldRect(
- {
- rect: data.predata?.mediaSourceInfo.rect,
- rotation: data.predata?.mediaSourceInfo.rotation,
- },
- { width: data.width, height: data.height }
- ),
- rotation: data.predata?.mediaSourceInfo.rotation,
- }
- };
-
- if (data.type === TRTCMediaSourceType.kScreen) {
- newMediaSource.screenType = data.screenType;
- }
-
- if (data.predata && newMediaSource) {
- logger.log(
- `${logPrefix}updateMediaSource newdata:`,
- JSON.stringify(newMediaSource));
- try {
- await mediaSourcesStore.replaceMediaSource(
- data.predata, newMediaSource);
- await mediaSourcesStore.selectMediaSource(newMediaSource);
- } catch (error) {
- TUIMessageBox({
- title: t('Note'),
- message: (error as any).message,
- confirmButtonText: t('Sure'),
- });
- }
- } else {
- logger.error(
- `${logPrefix}updateMediaSource invalid data:`, data.predata,
- newMediaSource);
- }
- } else {
- logger.warn(`${logPrefix}updateMediaSource with data not changed:`, data);
- }
-}
-
-async function _updateCameraMediaSource(data: Record) {
- logger.log(
- `${logPrefix}updateMediaSource predata:`, JSON.stringify(data.predata));
- const newMediaSource: TUIMediaSourceViewModel = {
- sourceName: data.name,
- aliasName: data.predata.aliasName,
- left: data.predata?.left,
- top: data.predata?.top,
- muted: false,
- resolution: {
- width: data.width,
- height: data.height
- },
- mediaSourceInfo: {
- sourceType: data.type,
- sourceId: data.id,
- zOrder: data.predata?.mediaSourceInfo.zOrder,
- rect: fitMediaSourceToOldRect(
- {
- rect: data.predata?.mediaSourceInfo.rect,
- rotation: data.predata?.mediaSourceInfo.rotation,
- },
- { width: data.width, height: data.height }
- ),
- mirrorType: data.mirrorType,
- rotation: data.predata?.mediaSourceInfo.rotation,
- },
- colorSpace: data.colorSpace,
- colorRange: data.colorRange,
- beautyConfig: data.beautyConfig
- };
- logger.log(`${logPrefix}updateMediaSource newdata:`, JSON.stringify(newMediaSource));
-
- try {
- if (data.id === data.predata?.mediaSourceInfo.sourceId) {
- await mediaSourcesStore.updateMediaSource(newMediaSource);
- } else {
- await mediaSourcesStore.replaceMediaSource(data.predata, newMediaSource);
- }
- await mediaSourcesStore.selectMediaSource(newMediaSource);
- } catch (error) {
- TUIMessageBox({
- title: t('Note'),
- message: (error as any).message,
- confirmButtonText: t('Sure'),
- });
- }
-}
-
-async function _updatePhoneMirrorMediaSource(data: Record) {
- logger.log(`${logPrefix}updateMediaSource data:`, JSON.stringify(data));
- const newMediaSource: TUIMediaSourceViewModel = {
- sourceName: data.predata.name,
- aliasName: data.predata.aliasName,
- left: data.predata.left,
- top: data.predata.top,
- muted: false,
- mediaSourceInfo: data.predata.mediaSourceInfo,
- mirrorParams: {
- frameRate: data.frameRate,
- bitrateKbps: data.bitrateKbps,
- connectType: data.connectType,
- platformType: data.platformType,
- deviceId: data.deviceId,
- deviceName: data.deviceName,
- placeholderImagePath: data.placeholderImagePath,
- }
- }
- if (data.connectType === 0) {
- window.ipcRenderer.send('start-use-driver-installer', data.platformType);
- }
- try {
- await mediaSourcesStore.updateMediaSource(newMediaSource);
- await mediaSourcesStore.selectMediaSource(newMediaSource);
- } catch (error) {
- TUIMessageBox({
- title: t('Note'),
- message: (error as any).message,
- confirmButtonText: t('Sure'),
- });
- }
-}
-
-async function _updateOnlineVideoMediaSource(data: Record) {
- logger.log(`${logPrefix}updateMediaSource data:`, JSON.stringify(data));
- const newMediaSource: TUIMediaSourceViewModel = {
- sourceName: data.name,
- aliasName: data.predata.aliasName,
- left: data.predata.left,
- top: data.predata.top,
- muted: false,
- mediaSourceInfo: {
- sourceType: data.type,
- sourceId: data.id,
- zOrder: data.predata?.mediaSourceInfo.zOrder,
- rect: fitMediaSourceToOldRect(
- {
- rect: data.predata?.mediaSourceInfo.rect,
- rotation: data.predata?.mediaSourceInfo.rotation,
- },
- {
- width: (data.predata?.mediaSourceInfo.rect.right - data.predata?.mediaSourceInfo.rect.left) || defaultCameraCaptureWidth,
- height: (data.predata?.mediaSourceInfo.rect.bottom - data.predata?.mediaSourceInfo.rect.top) || defaultCameraCaptureHeight
- }
- ),
- rotation: data.predata?.mediaSourceInfo.rotation,
- },
- volume: data.volume,
- networkCacheSize: data.networkCacheSize,
- }
-
- try {
- if (data.id === data.predata?.mediaSourceInfo.sourceId) {
- await mediaSourcesStore.updateMediaSource(newMediaSource);
- } else {
- await mediaSourcesStore.replaceMediaSource(data.predata, newMediaSource);
- }
- await mediaSourcesStore.selectMediaSource(newMediaSource);
- } catch (error) {
- TUIMessageBox({
- title: t('Note'),
- message: (error as any).message,
- confirmButtonText: t('Sure'),
- });
- }
-}
-
-async function _updateVideoFileMediaSource(data: Record) {
- logger.log(`${logPrefix}updateMediaSource data:`, JSON.stringify(data));
-
- const newMediaSource: TUIMediaSourceViewModel = {
- sourceName: data.name,
- aliasName: data.predata.aliasName,
- left: data.predata.left,
- top: data.predata.top,
- muted: false,
- mediaSourceInfo: {
- sourceType: data.type,
- sourceId: data.id,
- zOrder: data.predata?.mediaSourceInfo.zOrder,
- rect: fitMediaSourceToOldRect(
- {
- rect: data.predata?.mediaSourceInfo.rect,
- rotation: data.predata?.mediaSourceInfo.rotation,
- },
- {
- width: (data.predata?.mediaSourceInfo.rect.right - data.predata?.mediaSourceInfo.rect.left) || defaultCameraCaptureWidth,
- height: (data.predata?.mediaSourceInfo.rect.bottom - data.predata?.mediaSourceInfo.rect.top) || defaultCameraCaptureHeight
- }
- ),
- rotation: data.predata?.mediaSourceInfo.rotation,
- },
- volume: data.volume,
- }
-
- try {
- if (data.id === data.predata?.mediaSourceInfo.sourceId) {
- await mediaSourcesStore.updateMediaSource(newMediaSource);
- } else {
- await mediaSourcesStore.replaceMediaSource(data.predata, newMediaSource);
- }
- await mediaSourcesStore.selectMediaSource(newMediaSource);
- } catch (error) {
- TUIMessageBox({
- title: t('Note'),
- message: (error as any).message,
- confirmButtonText: t('Sure'),
- });
- }
-}
-
-export async function updateMediaSource(data: Record) {
- switch (data.type) {
- case TRTCMediaSourceType.kScreen:
- case TRTCMediaSourceType.kImage:
- await _updateScreenImageMediaSource(data);
- break;
- case TRTCMediaSourceType.kCamera:
- await _updateCameraMediaSource(data);
- break;
- case TRTCMediaSourceType.kPhoneMirror:
- await _updatePhoneMirrorMediaSource(data);
- break;
- case TRTCMediaSourceType.kOnlineVideo:
- await _updateOnlineVideoMediaSource(data);
- break;
- case TRTCMediaSourceType.kVideoFile:
- await _updateVideoFileMediaSource(data);
- break;
- default:
- logger.warn(
- `${logPrefix}updateMediaSource un-supported media type:`, data);
- break;
- }
-}
-
-async function handleUserApply(data: Record) {
- const { agree } = data;
- const user = JSON.parse(data.user);
- if (user.userId) {
- roomStore.handleApplyToAnchorUser(user.userId, agree);
- }
-}
-
-async function handleKickSeat(data: Record) {
- const {userId} = data;
- roomStore.kickUserOffSeat(userId);
-}
-
-async function handleKickOut(data: Record) {
- const {userId} = data;
- roomStore.kickUserOutOfRoom(userId);
-}
-
-async function handleChildWindowMessage(event: MessageEvent) {
- logger.log(`${logPrefix}handleChildWindowMessage:`, event.data);
- const {key, data} = event.data;
-
- switch (key) {
- case 'setCurrentDevice':
- switch (data.deviceType) {
- case TRTCDeviceType.TRTCDeviceTypeCamera:
- deviceManager.setCurrentCameraDevice(data.deviceId);
- break;
- case TRTCDeviceType.TRTCDeviceTypeMic:
- deviceManager.setCurrentMicDevice(data.deviceId);
- break;
- case TRTCDeviceType.TRTCDeviceTypeSpeaker:
- deviceManager.setCurrentSpeakerDevice(data.deviceId);
- break;
- default:
- break;
- }
- break;
- case 'startCameraDeviceTest':
- mediaMixingManager.startCameraDeviceTest(data.windowID, data.rect);
- if (data.log) {
- trtcCloud?.log(data.log);
- }
- break;
- case 'setCameraTestRenderMirror':
- mediaMixingManager.setCameraTestRenderMirror(data.mirror);
- break;
- case 'setCameraTestResolution':
- mediaMixingManager.setCameraTestResolution(data.width, data.height);
- break;
- case 'setCameraTestDeviceId':
- mediaMixingManager.setCameraTestDeviceId(data.cameraId);
- break;
- case 'stopCameraDeviceTest':
- mediaMixingManager.stopCameraDeviceTest();
- break;
- case 'setCameraTestVideoPluginPath':
- if (data) {
- const beautyLibPath = await TRTCXmagicFactory.getEffectPluginLibPath();
- const beautyInitParam = await TRTCXmagicFactory.buildEffectInitParam(XmagicLicense);
- mediaMixingManager.setCameraTestVideoPluginPath(beautyLibPath);
- mediaMixingManager.setCameraTestVideoPluginParameter(JSON.stringify(beautyInitParam));
- }else{
- mediaMixingManager.setCameraTestVideoPluginPath('');
- }
- break;
- case 'setCameraTestVideoPluginParameter':
- mediaMixingManager.setCameraTestVideoPluginParameter(JSON.stringify({
- beautySetting: Array.isArray(data) ? data : [data],
- }));
- break;
- case 'addMediaSource':
- addMediaSource(data);
- break;
- case 'updateMediaSource':
- updateMediaSource(data);
- break;
- case 'handleUserApply':
- handleUserApply(data);
- break;
- case 'kickOffSeat':
- handleKickSeat(data);
- break;
- case 'kickOutRoom':
- handleKickOut(data);
- break;
- case 'startTestSpeaker':
- deviceManager.startSpeakerDeviceTest(data);
- break;
- case 'stopTestSpeaker':
- deviceManager.stopSpeakerDeviceTest();
- break;
- case 'startTestMic':
- deviceManager.startMicDeviceTest(data.interval, data.playback);
- break;
- case 'stopTestMic':
- deviceManager.stopMicDeviceTest();
- break;
- case 'resumePlayMusic':
- if (data !== -1) {
- audioEffectStore.resumePlayMusic(data);
- }
- break;
- case 'pausePlayMusic':
- if (data !== -1) {
- audioEffectStore.pausePlayMusic(data);
- }
- break;
- case 'stopPlayMusic':
- if (data !== -1) {
- audioEffectStore.stopPlayMusic(data);
- }
- break;
- case 'setAllMusicVolume':
- if (data >= 0) {
- audioEffectStore.setAllMusicVolume(data);
- }
- break;
- case 'setCurrentDeviceVolume':
- if (data) {
- switch(data.type) {
- case TRTCDeviceType.TRTCDeviceTypeMic:
- deviceManager.setCurrentMicDeviceVolume(data.volume);
- break;
- case TRTCDeviceType.TRTCDeviceTypeSpeaker:
- deviceManager.setCurrentSpeakerVolume(data.volume);
- break;
- default:
- break;
- }
- }
- break;
- case 'setMusicPublishVolume':
- audioEffectStore.setMusicPublishVolume(data);
- break;
- case 'seekMusicToPosInTime':
- audioEffectStore.seekMusicToPosInTime(data);
- break;
- case 'singleLoopPlay':
- singleLoopPlay(data);
- break;
- case 'sequentialPlay':
- sequentialPlay(data);
- break;
- case 'updateAudioEffectData':
- if (data) {
- audioEffectStore.updateAudioEffectData(data);
- }
- break;
- case 'updatePlayingMusicId':
- if (data) {
- audioEffectStore.updatePlayingMusicId(data);
- if (messageChannels.messagePortToChild) {
- messageChannels.messagePortToChild.postMessage({
- key:'update-playing-music-id',
- data
- });
- } else {
- logger.error(`${logPrefix}updatePlayingMusicId failed. No message port.`);
- }
- }
- break;
- case 'setVoiceReverbType':
- if (data>=0) {
- audioEffectStore.setVoiceReverbType(data);
- }
- break;
- case 'setVoiceChangerType':
- if (data>=0) {
- audioEffectStore.setVoiceChangerType(data);
- }
- break;
- case 'setCoGuestLayoutTemplate':
- roomStore.setCoGuestLayoutTemplate(data.layoutTemplate);
- break;
- case 'setCoHostSetting':
- roomStore.setCoHostSetting(data);
- break;
- case 'fetchLiveList':
- roomStore.fetchLiveList();
- break;
- case 'fetchMoreLiveList':
- roomStore.fetchMoreLiveList();
- break;
- case 'requestAnchorConnection':
- roomStore.requestAnchorConnection(data);
- break;
- case 'cancelAnchorConnection':
- roomStore.cancelAnchorConnection(data);
- break;
- case 'stopAnchorConnection':
- roomStore.stopAnchorConnection();
- break;
- case 'startAnchorBattle':
- roomStore.startAnchorBattle();
- break;
- case 'requestAnchorBattle':
- roomStore.requestAnchorBattle(data);
- break;
- case 'cancelAnchorBattle':
- roomStore.cancelAnchorBattle(data);
- break;
- case 'stopAnchorBattle':
- roomStore.stopAnchorBattle();
- break;
- case 'updateUserProfile':
- roomStore.updateLocalUserProfile(data);
- break;
- default:
- logger.warn(
- `${logPrefix}handleChildWindowMessage: unsupported key: ${key}`);
- break;
- }
-}
-
-audioEffectManager.setMusicObserver({
- onStart: () => {
- return;
- },
- onPlayProgress: () => {
- return;
- },
- onComplete: (id: number) => {
- if (messageChannels.messagePortToChild) {
- if (audioEffectStore.audioEffect.currentPlayMode === TUIMusicPlayMode.SingleLoopPlay) {
- messageChannels.messagePortToChild.postMessage({key: 'update-playing-music-id', data:id});
- } else if (audioEffectStore.audioEffect.currentPlayMode === TUIMusicPlayMode.SequentialPlay) {
- let nextPlayingIndex = audioEffectStore.getMusicIndex(id) + 1;
- if (nextPlayingIndex === audioEffectStore.getMusicDataLength()) {
- nextPlayingIndex = 0;
- }
- const nextPlayingId = audioEffectStore.audioEffect.musicDataList[nextPlayingIndex].id;
- messageChannels.messagePortToChild.postMessage({key: 'update-playing-music-id', data:nextPlayingId});
- }
- } else {
- logger.error(`${logPrefix}musicObserver.onComplete failed. No message port.`);
- }
- }
-});
-
-async function singleLoopPlay(id:number) {
- if(id === -1) return;
- audioEffectStore.startPlayMusic(id);
-}
-
-async function sequentialPlay(playingMusicIndex: number) {
- const id = audioEffectStore.audioEffect.musicDataList[playingMusicIndex].id;
- if (id !== -1) {
- audioEffectStore.startPlayMusic(id);
- }
-}
-
-export function initCommunicationChannels(data: Record) {
- logger.log(`${logPrefix}initCommunicationChannels`);
- mediaSourcesStore = data.mediaSourcesStore;
- roomStore = data.roomStore;
-
- if (!messageChannels.messagePortToChild) {
- const messageChannel = new MessageChannel();
-
- messageChannels.messagePortToChild = messageChannel.port1;
- const messagePortToMain = messageChannel.port2;
- messageChannels.messagePortToChild.onmessage = handleChildWindowMessage;
- messageChannels.messagePortToChild.onmessageerror = (event) => {
- logger.log(`${logPrefix}onmessageerror from child window:`, event.data);
- };
- messageChannels.messagePortToChild.start();
- window.ipcRenderer.postMessage('port-to-child', null, [messagePortToMain]);
- } else {
- logger.warn(`${logPrefix}initCommunicationChannels MessageChannel to child window already existed.`);
- }
-
- if (!messageChannels.messagePortToCover) {
- const messageChannel = new MessageChannel();
-
- messageChannels.messagePortToCover = messageChannel.port1;
- const messagePortToMain = messageChannel.port2;
- messageChannels.messagePortToCover.onmessage = handleChildWindowMessage;
- messageChannels.messagePortToCover.onmessageerror = (event) => {
- logger.log(`${logPrefix}onmessageerror from cover window:`, event.data);
- };
- messageChannels.messagePortToCover.start();
- window.ipcRenderer.postMessage('port-to-cover', null, [messagePortToMain]);
- } else {
- logger.warn(`${logPrefix}initCommunicationChannels MessageChannel to cover window already existed.`);
- }
-
- if (!messageChannels.messagePortToConfirm) {
- const messageChannel = new MessageChannel();
-
- messageChannels.messagePortToConfirm = messageChannel.port1;
- const messagePortToMain = messageChannel.port2;
- messageChannels.messagePortToConfirm.onmessage = handleChildWindowMessage;
- messageChannels.messagePortToConfirm.onmessageerror = (event) => {
- logger.log(`${logPrefix}onmessageerror from confirm window:`, event.data);
- };
- messageChannels.messagePortToConfirm.start();
- window.ipcRenderer.postMessage('port-to-confirm', null, [messagePortToMain]);
- } else {
- logger.warn(`${logPrefix}initCommunicationChannels MessageChannel to confirm window already existed.`);
- }
-}
diff --git a/src/TUILiveKit/components/LiveChildView/LiveChildHeader.vue b/src/TUILiveKit/components/LiveChildView/LiveChildHeader.vue
deleted file mode 100644
index 97597df..0000000
--- a/src/TUILiveKit/components/LiveChildView/LiveChildHeader.vue
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
-
-
-
-
-
diff --git a/src/TUILiveKit/components/LiveChildView/LiveCoGuest/ApplicationList.vue b/src/TUILiveKit/components/LiveChildView/LiveCoGuest/ApplicationList.vue
deleted file mode 100644
index da82ca5..0000000
--- a/src/TUILiveKit/components/LiveChildView/LiveCoGuest/ApplicationList.vue
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-
-
-
-
![]()
-
-
-
{{ user.userName || user.userId }}
-
- {{ t('Accept')}}
- {{ t('Rejection')}}
-
-
-
-
-
- {{ t('No application for live') }}
-
-
-
-
-
diff --git a/src/TUILiveKit/components/LiveChildView/LiveCoGuest/Index.vue b/src/TUILiveKit/components/LiveChildView/LiveCoGuest/Index.vue
deleted file mode 100644
index e09719e..0000000
--- a/src/TUILiveKit/components/LiveChildView/LiveCoGuest/Index.vue
+++ /dev/null
@@ -1,245 +0,0 @@
-
-
-
-
-
-
isLayoutConfigVisible = val"
- @update:layoutTemplate="handleLayoutTemplateChange"/>
-
- {{ t('Application for live') }}
- {{ t('Co-guest management') }}
-
-
-
-
-
-
-
-
diff --git a/src/TUILiveKit/components/LiveChildView/LiveCoGuest/LayoutConfig.vue b/src/TUILiveKit/components/LiveChildView/LiveCoGuest/LayoutConfig.vue
deleted file mode 100644
index c47400e..0000000
--- a/src/TUILiveKit/components/LiveChildView/LiveCoGuest/LayoutConfig.vue
+++ /dev/null
@@ -1,197 +0,0 @@
-
-
-
-
- {{ t('Audience Layout') }}
-
-
-
-
-
-
-
-
{{ template.label }}
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/TUILiveKit/components/LiveChildView/LiveCoGuest/SeatList.vue b/src/TUILiveKit/components/LiveChildView/LiveCoGuest/SeatList.vue
deleted file mode 100644
index 44569b3..0000000
--- a/src/TUILiveKit/components/LiveChildView/LiveCoGuest/SeatList.vue
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
-
-
- {{ t('Current seat') }}
- {{ `(${seatedList.length})` }}
-
-
-
-
![]()
-
-
-
- {{ item.userName || item.userId }}
- {{ `(${t('Me')})` }}
-
-
- {{ t('Disconnect')}}
-
-
-
-
-
- {{ t('Seat is empty') }}
-
-
-
-
-
diff --git a/src/TUILiveKit/components/LiveChildView/LiveMemberControl.vue b/src/TUILiveKit/components/LiveChildView/LiveMemberControl.vue
deleted file mode 100644
index c502e07..0000000
--- a/src/TUILiveKit/components/LiveChildView/LiveMemberControl.vue
+++ /dev/null
@@ -1,133 +0,0 @@
-
-
-
-
-
-
diff --git a/src/TUILiveKit/components/LiveChildView/LiveMoreTool/LiveAddBgm.vue b/src/TUILiveKit/components/LiveChildView/LiveMoreTool/LiveAddBgm.vue
deleted file mode 100644
index 19eadb2..0000000
--- a/src/TUILiveKit/components/LiveChildView/LiveMoreTool/LiveAddBgm.vue
+++ /dev/null
@@ -1,365 +0,0 @@
-
-
-
-
-
diff --git a/src/TUILiveKit/components/LiveChildView/LiveMoreTool/LiveChangeVoice.vue b/src/TUILiveKit/components/LiveChildView/LiveMoreTool/LiveChangeVoice.vue
deleted file mode 100644
index 89d2530..0000000
--- a/src/TUILiveKit/components/LiveChildView/LiveMoreTool/LiveChangeVoice.vue
+++ /dev/null
@@ -1,207 +0,0 @@
-
-
-
-
-
-
-
-
-
{{t(`${item.text}`)}}
-
-
-
-
-
-
-
diff --git a/src/TUILiveKit/components/LiveChildView/LiveMoreTool/LiveCoHost/Index.vue b/src/TUILiveKit/components/LiveChildView/LiveMoreTool/LiveCoHost/Index.vue
deleted file mode 100644
index a0c8c1a..0000000
--- a/src/TUILiveKit/components/LiveChildView/LiveMoreTool/LiveCoHost/Index.vue
+++ /dev/null
@@ -1,287 +0,0 @@
-
-
-
-
-
-
isSettingVisible = val"
- @on-confirm="confirmSetting"
- @on-cancel="cancelSetting"/>
-
- {{ t('Co-host battle') }}
- {{ t('Co-host connection') }}
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/TUILiveKit/components/LiveChildView/LiveMoreTool/LiveCoHost/LiveCoHostBattle.vue b/src/TUILiveKit/components/LiveChildView/LiveMoreTool/LiveCoHost/LiveCoHostBattle.vue
deleted file mode 100644
index e0c35ea..0000000
--- a/src/TUILiveKit/components/LiveChildView/LiveMoreTool/LiveCoHost/LiveCoHostBattle.vue
+++ /dev/null
@@ -1,142 +0,0 @@
-
-
-
-
-
-
-
![]()
-
-
- {{ item.userName }}
- {{ t('In battle ...') }}
-
-
-
-
-
- {{ t('Candidate anchors') }}
-
-
-
-
-
![]()
-
-
- {{ item.userName }}
- {{ t('Cancel Invitation') }}
-
-
-
-
-
-
![]()
-
-
- {{ item.ownerName || item.roomOwner }}
- {{ item.battleStatus === 'Disconnected' ? t('Invite Battle') : t('Cancel Invitation') }}
-
-
-
-
-
- {{ t('No more anchors') }}
-
-
-
-
-
-
-
-
diff --git a/src/TUILiveKit/components/LiveChildView/LiveMoreTool/LiveCoHost/LiveCoHostConnection.vue b/src/TUILiveKit/components/LiveChildView/LiveMoreTool/LiveCoHost/LiveCoHostConnection.vue
deleted file mode 100644
index c2d1506..0000000
--- a/src/TUILiveKit/components/LiveChildView/LiveMoreTool/LiveCoHost/LiveCoHostConnection.vue
+++ /dev/null
@@ -1,155 +0,0 @@
-
-
-
-
-
{{ `${t('Connected Anchors')}(${connectedUserList.length}/9)` }}
-
-
-
![]()
-
-
- {{ item.userName }}
- {{ t('In connection ...') }}
-
-
-
-
-
- {{ isInConnection ? t('Invite more anchors') : t('Candidate anchors')}}
-
-
-
-
-
-
![]()
-
-
- {{ item.userName }}
- {{ t('Cancel Invitation') }}
-
-
-
-
-
-
-
![]()
-
-
- {{ item.ownerName || item.roomOwner }}
- {{ item.connectionStatus === 'Disconnected' ? t('Invite Connection') : t('Cancel Invitation') }}
-
-
-
-
-
- {{ t('No more anchors') }}
-
-
-
-
-
-
-
-
diff --git a/src/TUILiveKit/components/LiveChildView/LiveMoreTool/LiveCoHost/LiveCoHostSetting.vue b/src/TUILiveKit/components/LiveChildView/LiveMoreTool/LiveCoHost/LiveCoHostSetting.vue
deleted file mode 100644
index a844d91..0000000
--- a/src/TUILiveKit/components/LiveChildView/LiveMoreTool/LiveCoHost/LiveCoHostSetting.vue
+++ /dev/null
@@ -1,279 +0,0 @@
-
-
-
-
-
- {{ t('Co-host Layout') }}
-
-
-
-
-
-
-
-
{{ template.label }}
-
-
-
-
-
-
-
-
- {{ t('Battle duration') }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/TUILiveKit/components/LiveChildView/LiveMoreTool/LiveReverbVoice.vue b/src/TUILiveKit/components/LiveChildView/LiveMoreTool/LiveReverbVoice.vue
deleted file mode 100644
index 27e219f..0000000
--- a/src/TUILiveKit/components/LiveChildView/LiveMoreTool/LiveReverbVoice.vue
+++ /dev/null
@@ -1,210 +0,0 @@
-
-
-
-
-
-
-
-
-
{{t(`${item.text}`)}}
-
-
-
-
-
-
-
diff --git a/src/TUILiveKit/components/LiveChildView/LiveSetting.vue b/src/TUILiveKit/components/LiveChildView/LiveSetting.vue
deleted file mode 100644
index 8fb87cf..0000000
--- a/src/TUILiveKit/components/LiveChildView/LiveSetting.vue
+++ /dev/null
@@ -1,105 +0,0 @@
-
-
-
-
-
diff --git a/src/TUILiveKit/components/LiveChildView/LiveSource/LiveCameraSource.vue b/src/TUILiveKit/components/LiveChildView/LiveSource/LiveCameraSource.vue
deleted file mode 100644
index fbcf424..0000000
--- a/src/TUILiveKit/components/LiveChildView/LiveSource/LiveCameraSource.vue
+++ /dev/null
@@ -1,178 +0,0 @@
-
-
-
-
-
diff --git a/src/TUILiveKit/components/LiveChildView/LiveSource/LiveOnlineVideo.vue b/src/TUILiveKit/components/LiveChildView/LiveSource/LiveOnlineVideo.vue
deleted file mode 100644
index 5e885ae..0000000
--- a/src/TUILiveKit/components/LiveChildView/LiveSource/LiveOnlineVideo.vue
+++ /dev/null
@@ -1,272 +0,0 @@
-
-
-
-
-
-
-
diff --git a/src/TUILiveKit/components/LiveChildView/LiveSource/LivePhoneMirror.vue b/src/TUILiveKit/components/LiveChildView/LiveSource/LivePhoneMirror.vue
deleted file mode 100644
index 66fce72..0000000
--- a/src/TUILiveKit/components/LiveChildView/LiveSource/LivePhoneMirror.vue
+++ /dev/null
@@ -1,276 +0,0 @@
-
-
-
-
-
-
-
diff --git a/src/TUILiveKit/components/LiveChildView/LiveSource/LiveScreenShareSource.vue b/src/TUILiveKit/components/LiveChildView/LiveSource/LiveScreenShareSource.vue
deleted file mode 100644
index 243497c..0000000
--- a/src/TUILiveKit/components/LiveChildView/LiveSource/LiveScreenShareSource.vue
+++ /dev/null
@@ -1,205 +0,0 @@
-
-
-
-
-
-
diff --git a/src/TUILiveKit/components/LiveChildView/LiveSource/LiveVideoFile.vue b/src/TUILiveKit/components/LiveChildView/LiveSource/LiveVideoFile.vue
deleted file mode 100644
index 3a51ed4..0000000
--- a/src/TUILiveKit/components/LiveChildView/LiveSource/LiveVideoFile.vue
+++ /dev/null
@@ -1,290 +0,0 @@
-
-
-
-
-
-
-
{{ t('Video Setting') }}
-
-
{{ t('Volume') }}
-
-
-
-
{{ videoVolume }}
-
-
-
-
-
-
-
-
-
-
diff --git a/src/TUILiveKit/components/LiveChildView/LiveSource/ScreenWindowPreviewer.vue b/src/TUILiveKit/components/LiveChildView/LiveSource/ScreenWindowPreviewer.vue
deleted file mode 100644
index 0a4d77e..0000000
--- a/src/TUILiveKit/components/LiveChildView/LiveSource/ScreenWindowPreviewer.vue
+++ /dev/null
@@ -1,85 +0,0 @@
-
-
-
- {{ data.sourceName }}
-
-
-
-
-
diff --git a/src/TUILiveKit/components/LiveChildView/LiveUserProfile.vue b/src/TUILiveKit/components/LiveChildView/LiveUserProfile.vue
deleted file mode 100644
index 1154375..0000000
--- a/src/TUILiveKit/components/LiveChildView/LiveUserProfile.vue
+++ /dev/null
@@ -1,410 +0,0 @@
-
-
-
-
-
-
-
-
-
- {{ t("User ID") }}
-
- {{ editableData.userId }}
-
-
-
-
-
-
-
{{ t("User Name") }}
-
-
- {{ editableData.userName || t("Not set") }}
-
-
-
-
-
-
-
-
-
{{ t("Avatar URL") }}
-
-
- {{ editableData.avatarUrl || t("Not set") }}
-
-
-
-
-
-
-
-
- {{ t("SDKAPPID") }}
-
- {{ editableData.sdkAppId }}
-
-
-
-
-
-
- {{ t("User Signature") }}
-
- {{ editableData.userSig || t("Not set") }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/TUILiveKit/components/LiveConfig/Index.vue b/src/TUILiveKit/components/LiveConfig/Index.vue
deleted file mode 100644
index 3fe67bd..0000000
--- a/src/TUILiveKit/components/LiveConfig/Index.vue
+++ /dev/null
@@ -1,800 +0,0 @@
-
-
-
-
{{ t('Sources')}}
-
{{ t('Video Encode')}}
-
-
-
- {{ t('Support diverse types of media sources')}}
-
-
-
-
-
-
-
-
-
-
-
-
- {{t('Background color')}}
-
-
-
- {{t('Video resolution')}}
-
-
-
-
-
- {{t('Video FPS')}}
-
-
-
-
-
- {{t('Video Bitrate')}}
-
-
-
-
-
- {{t('Color Space')}}
-
-
-
-
-
- {{t('Color Range')}}
-
-
-
-
-
- {{t('Encode Gear')}}
-
-
-
-
-
-
-
-
- {{t('Selected border color')}}
-
-
-
-
-
-
-
-
diff --git a/src/TUILiveKit/components/LiveController/Index.vue b/src/TUILiveKit/components/LiveController/Index.vue
deleted file mode 100644
index 8ea3259..0000000
--- a/src/TUILiveKit/components/LiveController/Index.vue
+++ /dev/null
@@ -1,291 +0,0 @@
-
-
-
-
-
diff --git a/src/TUILiveKit/components/LiveCoverView/StreamCover.vue b/src/TUILiveKit/components/LiveCoverView/StreamCover.vue
index ba05bf0..5d2bf9f 100644
--- a/src/TUILiveKit/components/LiveCoverView/StreamCover.vue
+++ b/src/TUILiveKit/components/LiveCoverView/StreamCover.vue
@@ -4,21 +4,16 @@
-
{{ props.region.userName || props.region.userId }}
-
{{ props.region.seatIndex }}
- {{ t('Conn Wait') }}
+ {{ t('LiveView.WaitingForConnection') }}
@@ -28,10 +23,8 @@ import { ref, computed, defineProps, onMounted, onUnmounted } from 'vue';
import type { Ref } from 'vue';
import { TUIDeviceStatus } from '@tencentcloud/tuiroom-engine-electron';
import { TUIConnectionMode, TUIUserSeatStreamRegion } from '../../types';
-import { useI18n } from '../../locales';
+import { useUIKit } from '@tencentcloud/uikit-base-component-vue3';
import MicOffIcon from '../../common/icons/MicOffIcon.vue';
-import MoreIcon from '../../common/icons/MoreIcon.vue';
-import LiveMemberControl from '../LiveChildView/LiveMemberControl.vue';
import { DEFAULT_USER_AVATAR_URL } from '../../constants/tuiConstant';
import logger from '../../utils/logger';
@@ -42,12 +35,10 @@ type Props = {
const logPrefix = '[TUILiveKitStreamCover]';
-const { t } = useI18n();
+const { t } = useUIKit();
const props = defineProps();
const streamCoverRef: Ref = ref(null);
-const moreIconRef: Ref = ref(null);
-const isMoreMenuVisible: Ref = ref(false);
const positonStyle = computed(() => {
return {
@@ -58,35 +49,6 @@ const positonStyle = computed(() => {
};
});
-const openMoreMenu = () => {
- isMoreMenuVisible.value = true;
-};
-
-const closeMoreMenu = () => {
- isMoreMenuVisible.value = false;
-};
-
-const onKickOffSeat = (userId: string) => {
- logger.log(`${logPrefix}onKickOffSeat:${userId}`);
- window.mainWindowPortInCover?.postMessage({
- key: 'kickOffSeat',
- data: {
- userId,
- }
- });
-};
-
-
-const onKickOutRoom = (userId: string) => {
- logger.log(`${logPrefix}onKickOutRoom:${userId}`);
- window.mainWindowPortInCover?.postMessage({
- key: 'kickOutRoom',
- data: {
- userId,
- }
- });
-};
-
// eslint-disable-next-line no-undef
let timerId: string | number | NodeJS.Timeout | undefined;
const bindMouseEnterLeaveEvent = () => {
@@ -106,23 +68,14 @@ const bindMouseEnterLeaveEvent = () => {
}
};
-const onClickOutMenuSide = (event: MouseEvent) => {
- if (moreIconRef.value && moreIconRef.value.contains(event.target as Node)) {
- return;
- }
- closeMoreMenu();
-};
-
onMounted(() => {
bindMouseEnterLeaveEvent();
- document.addEventListener('click', onClickOutMenuSide, false);
});
onUnmounted(() => {
if (timerId) {
clearTimeout(timerId);
}
- document.removeEventListener('click', onClickOutMenuSide, false);
});
@@ -146,33 +99,6 @@ onUnmounted(() => {
}
}
- &:hover .tui-menu-icon {
- display: block;
- }
- .tui-menu-icon {
- display: none;
- position: absolute;
- top: 0.125rem;
- right: 0.125rem;
- width: 1.25rem;
- height: 1.25rem;
- border-radius: 0.25rem;
- background-color: $color-cover-pendant-background;
- cursor: pointer;
-
- .tui-more-icon {
- transform: rotate(90deg);
- }
-
- &:hover {
- background-color: $font-button-text-hover-color;
- }
-
- &:active {
- background-color: $font-button-text-active-color;
- }
- }
-
.tui-stream-state {
position: absolute;
left: 0.125rem;
@@ -216,24 +142,20 @@ onUnmounted(() => {
flex-direction: column;
align-items: center;
justify-content: center;
+ text-align: center;
color: var(--text-color-secondary);
.tui-seat-index {
- font-size: 1.25rem;
- font-weight: 600;
- line-height: 1.5;
- color: var(--text-color-primary);
+ font-size: 1.5rem;
+ font-weight: 500;
}
.tui-seat-hint {
- font-size: 0.75rem;
- line-height: 1.5;
- opacity: 0.7;
+ max-width: 80%;
+ font-size: 0.875rem;
+ font-weight: 400;
+ overflow-wrap: break-word;
}
}
-
- .tui-stream-cover-pop-menu {
- top: 1.5rem;
- }
}
diff --git a/src/TUILiveKit/components/LiveHeader/Index.vue b/src/TUILiveKit/components/LiveHeader/Index.vue
deleted file mode 100644
index cbf0a27..0000000
--- a/src/TUILiveKit/components/LiveHeader/Index.vue
+++ /dev/null
@@ -1,345 +0,0 @@
-
-
-
-
-
-
-
diff --git a/src/TUILiveKit/components/LiveMember/Index.vue b/src/TUILiveKit/components/LiveMember/Index.vue
deleted file mode 100644
index fce271b..0000000
--- a/src/TUILiveKit/components/LiveMember/Index.vue
+++ /dev/null
@@ -1,90 +0,0 @@
-
-
-
- {{t('Online audience')}}
-
-
-
-
-
![]()
-
{{item.userName || item.userId}}
-
{{ 0 }}
-
-
-
-
{{ t('No audience yet') }}
-
-
-
-
-
-
diff --git a/src/TUILiveKit/components/LiveMessage/Index.vue b/src/TUILiveKit/components/LiveMessage/Index.vue
deleted file mode 100644
index 90a124f..0000000
--- a/src/TUILiveKit/components/LiveMessage/Index.vue
+++ /dev/null
@@ -1,245 +0,0 @@
-
-
-
- {{t('Message List')}}
-
-
-
{{t('No message yet')}}
-
-
-
-
- {{t('Gift-giving news')}}
-
-
- {{ totalGiftsSent }}
-
- {{ totalGiftCoins }}
-
-
-
-
- {{`${item.sender.nameCard || item.sender.userName || item.sender.userId}:`}}
-
- {{t('send out')}}
- {{t(item.gift.name)}}
-
- x
- {{item.count}}
-
-
-
-
-
-
-
{{t('Interactive messages')}}
-
-
- {{`${item.nick}:`}}
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/TUILiveKit/components/LiveMessage/MessageText.vue b/src/TUILiveKit/components/LiveMessage/MessageText.vue
deleted file mode 100644
index 8019d24..0000000
--- a/src/TUILiveKit/components/LiveMessage/MessageText.vue
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-
- {{ item.text }}
-
-
-
-
-
-
-
-
diff --git a/src/TUILiveKit/components/LiveMessage/chatEditor.vue b/src/TUILiveKit/components/LiveMessage/chatEditor.vue
deleted file mode 100644
index 3764805..0000000
--- a/src/TUILiveKit/components/LiveMessage/chatEditor.vue
+++ /dev/null
@@ -1,141 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/src/TUILiveKit/components/LiveMessage/emoji.vue b/src/TUILiveKit/components/LiveMessage/emoji.vue
deleted file mode 100644
index b1e81a8..0000000
--- a/src/TUILiveKit/components/LiveMessage/emoji.vue
+++ /dev/null
@@ -1,81 +0,0 @@
-
-
-
-
-
-
-
diff --git a/src/TUILiveKit/components/LiveMessage/useMessageHook.ts b/src/TUILiveKit/components/LiveMessage/useMessageHook.ts
deleted file mode 100644
index ebc3daf..0000000
--- a/src/TUILiveKit/components/LiveMessage/useMessageHook.ts
+++ /dev/null
@@ -1,70 +0,0 @@
-import { onUnmounted } from 'vue';
-import { useChatStore } from '../../store/main/chat';
-import { useBasicStore } from '../../store/main/basic';
-import TUIRoomEngine, { TencentCloudChat } from '@tencentcloud/tuiroom-engine-electron';
-import useRoomEngine from '../../utils/useRoomEngine';
-import logger from '../../utils/logger';
-
-const logPrefix = '[useMessageHook]';
-
-export default function useMessageHook() {
- logger.log(`${logPrefix}invoked`);
- const roomEngine = useRoomEngine();
- const chatStore = useChatStore();
- const basicStore = useBasicStore();
-
- const onReceiveMessage = (options: { data: any }) => {
- logger.debug(`${logPrefix}onReceivceMessage:`, options);
- if (!options || !options.data) {
- return;
- }
- options.data.forEach((message: any) => {
- if (message.type === TencentCloudChat.TYPES.MSG_TEXT) {
- handleTextMessage(message);
- } else if (message.type === TencentCloudChat.TYPES.MSG_CUSTOM) {
- handleCustomMessage(message);
- }
- });
- };
-
- const handleTextMessage = (message: any) => {
- if (message.type !== TencentCloudChat.TYPES.MSG_TEXT) {
- return;
- }
- const { ID, payload: { text }, nick: userName, from: userId } = message;
- chatStore.updateMessageList({
- ID,
- type: 'TIMTextElem',
- payload: {
- text,
- },
- nick: userName || userId,
- from: userId,
- flow: 'in',
- sequence: Math.random(),
- });
- };
-
- const handleCustomMessage = (message: any) => {
- if (message.type !== TencentCloudChat.TYPES.MSG_CUSTOM) {
- return;
- }
- }
-
- TUIRoomEngine.once('ready', () => {
- logger.log(`${logPrefix}TUIRoomEngine ready`);
- let tim = roomEngine.instance?.getTIM();
- if (!tim) {
- logger.warn(`${logPrefix} create TIM instance here`);
- tim = TencentCloudChat.create({ SDKAppID: basicStore.sdkAppId });
- }
- tim?.on(TencentCloudChat.EVENT.MESSAGE_RECEIVED, onReceiveMessage);
- });
- onUnmounted(() => {
- logger.log(`${logPrefix}onUnmounted`);
- const tim = roomEngine.instance?.getTIM();
- tim?.off(TencentCloudChat.EVENT.MESSAGE_RECEIVED, onReceiveMessage);
- });
-
- return {};
-}
diff --git a/src/TUILiveKit/components/LiveMessage/util.ts b/src/TUILiveKit/components/LiveMessage/util.ts
deleted file mode 100644
index f263c95..0000000
--- a/src/TUILiveKit/components/LiveMessage/util.ts
+++ /dev/null
@@ -1,513 +0,0 @@
-/**
- * Emoji input interface in the chat screen.
- * It should be noted that the emoticons in TUILiveKit are copyrighted. The purchased IM service does not include the
- * right to use the emoticons. Please replace them with your own emoticons when you go online, otherwise you will
- * face legal risks.
- * The yellow face emoji is copyrighted by Tencent Cloud. To use it, authorization is required.
- * Please contact us through the following link.
- *
- * https://cloud.tencent.com/document/product/269/59590
- */
-
-export const emojiBaseUrl = 'https://web.sdk.qcloud.com/im/assets/emoji-plugin/';
-const deprecatedEmojiBaseUrl = 'https://web.sdk.qcloud.com/im/assets/emoji/';
-export const emojiMap: Record = {
- '[TUIEmoji_Expect]': 'emoji_0@2x.png',
- '[TUIEmoji_Blink]': 'emoji_1@2x.png',
- '[TUIEmoji_Guffaw]': 'emoji_2@2x.png',
- '[TUIEmoji_KindSmile]': 'emoji_3@2x.png',
- '[TUIEmoji_Haha]': 'emoji_4@2x.png',
- '[TUIEmoji_Cheerful]': 'emoji_5@2x.png',
- '[TUIEmoji_Smile]': 'emoji_6@2x.png',
- '[TUIEmoji_Sorrow]': 'emoji_7@2x.png',
- '[TUIEmoji_Speechless]': 'emoji_8@2x.png',
- '[TUIEmoji_Amazed]': 'emoji_9@2x.png',
- '[TUIEmoji_Complacent]': 'emoji_10@2x.png',
- '[TUIEmoji_Lustful]': 'emoji_11@2x.png',
- '[TUIEmoji_Stareyes]': 'emoji_12@2x.png',
- '[TUIEmoji_Giggle]': 'emoji_13@2x.png',
- '[TUIEmoji_Daemon]': 'emoji_14@2x.png',
- '[TUIEmoji_Rage]': 'emoji_15@2x.png',
- '[TUIEmoji_Yawn]': 'emoji_16@2x.png',
- '[TUIEmoji_TearsLaugh]': 'emoji_17@2x.png',
- '[TUIEmoji_Silly]': 'emoji_18@2x.png',
- '[TUIEmoji_Wail]': 'emoji_19@2x.png',
- '[TUIEmoji_Kiss]': 'emoji_20@2x.png',
- '[TUIEmoji_Trapped]': 'emoji_21@2x.png',
- '[TUIEmoji_Fear]': 'emoji_22@2x.png',
- '[TUIEmoji_BareTeeth]': 'emoji_23@2x.png',
- '[TUIEmoji_FlareUp]': 'emoji_24@2x.png',
- '[TUIEmoji_Tact]': 'emoji_25@2x.png',
- '[TUIEmoji_Shit]': 'emoji_26@2x.png',
- '[TUIEmoji_ShutUp]': 'emoji_27@2x.png',
- '[TUIEmoji_Sigh]': 'emoji_28@2x.png',
- '[TUIEmoji_Hehe]': 'emoji_29@2x.png',
- '[TUIEmoji_Silent]': 'emoji_30@2x.png',
- '[TUIEmoji_Skull]': 'emoji_31@2x.png',
- '[TUIEmoji_Mask]': 'emoji_32@2x.png',
- '[TUIEmoji_Beer]': 'emoji_33@2x.png',
- '[TUIEmoji_Cake]': 'emoji_34@2x.png',
- '[TUIEmoji_RedPacket]': 'emoji_35@2x.png',
- '[TUIEmoji_Bombs]': 'emoji_36@2x.png',
- '[TUIEmoji_Ai]': 'emoji_37@2x.png',
- '[TUIEmoji_Celebrate]': 'emoji_38@2x.png',
- '[TUIEmoji_Bless]': 'emoji_39@2x.png',
- '[TUIEmoji_Flower]': 'emoji_40@2x.png',
- '[TUIEmoji_Watermelon]': 'emoji_41@2x.png',
- '[TUIEmoji_Cow]': 'emoji_42@2x.png',
- '[TUIEmoji_Fool]': 'emoji_43@2x.png',
- '[TUIEmoji_Surprised]': 'emoji_44@2x.png',
- '[TUIEmoji_Askance]': 'emoji_45@2x.png',
- '[TUIEmoji_Monster]': 'emoji_46@2x.png',
- '[TUIEmoji_Pig]': 'emoji_47@2x.png',
- '[TUIEmoji_Coffee]': 'emoji_48@2x.png',
- '[TUIEmoji_Ok]': 'emoji_49@2x.png',
- '[TUIEmoji_Heart]': 'emoji_50@2x.png',
- '[TUIEmoji_Sun]': 'emoji_51@2x.png',
- '[TUIEmoji_Moon]': 'emoji_52@2x.png',
- '[TUIEmoji_Star]': 'emoji_53@2x.png',
- '[TUIEmoji_Rich]': 'emoji_54@2x.png',
- '[TUIEmoji_Fortune]': 'emoji_55@2x.png',
- '[TUIEmoji_857]': 'emoji_56@2x.png',
- '[TUIEmoji_666]': 'emoji_57@2x.png',
- '[TUIEmoji_Prohibit]': 'emoji_58@2x.png',
- '[TUIEmoji_Convinced]': 'emoji_59@2x.png',
- '[TUIEmoji_Knife]': 'emoji_60@2x.png',
- '[TUIEmoji_Like]': 'emoji_61@2x.png'
-}
-
-const emojiNameMapping: Record = {
- '[微笑]': '[TUIEmoji_Smile]',
- '[期待]': '[TUIEmoji_Expect]',
- '[眨眼]': '[TUIEmoji_Blink]',
- '[大笑]': '[TUIEmoji_Guffaw]',
- '[姨母笑]': '[TUIEmoji_KindSmile]',
- '[哈哈哈]': '[TUIEmoji_Haha]',
- '[愉快]': '[TUIEmoji_Cheerful]',
- '[无语]': '[TUIEmoji_Speechless]',
- '[惊讶]': '[TUIEmoji_Amazed]',
- '[悲伤]': '[TUIEmoji_Sorrow]',
- '[得意]': '[TUIEmoji_Complacent]',
- '[傻了]': '[TUIEmoji_Silly]',
- '[色]': '[TUIEmoji_Lustful]',
- '[憨笑]': '[TUIEmoji_Giggle]',
- '[亲亲]': '[TUIEmoji_Kiss]',
- '[大哭]': '[TUIEmoji_Wail]',
- '[哭笑]': '[TUIEmoji_TearsLaugh]',
- '[困]': '[TUIEmoji_Trapped]',
- '[口罩]': '[TUIEmoji_Mask]',
- '[恐惧]': '[TUIEmoji_Fear]',
- '[龇牙]': '[TUIEmoji_BareTeeth]',
- '[发怒]': '[TUIEmoji_FlareUp]',
- '[打哈欠]': '[TUIEmoji_Yawn]',
- '[机智]': '[TUIEmoji_Tact]',
- '[星星眼]': '[TUIEmoji_Stareyes]',
- '[闭嘴]': '[TUIEmoji_ShutUp]',
- '[叹气]': '[TUIEmoji_Sigh]',
- '[呵呵]': '[TUIEmoji_Hehe]',
- '[收声]': '[TUIEmoji_Silent]',
- '[惊喜]': '[TUIEmoji_Surprised]',
- '[白眼]': '[TUIEmoji_Askance]',
- '[OK]': '[TUIEmoji_Ok]',
- '[便便]': '[TUIEmoji_Shit]',
- '[怪兽]': '[TUIEmoji_Monster]',
- '[恶魔]': '[TUIEmoji_Daemon]',
- '[恶魔怒]': '[TUIEmoji_Rage]',
- '[衰]': '[TUIEmoji_Fool]',
- '[猪]': '[TUIEmoji_Pig]',
- '[牛]': '[TUIEmoji_Cow]',
- '[AI]': '[TUIEmoji_Ai]',
- '[骷髅]': '[TUIEmoji_Skull]',
- '[炸弹]': '[TUIEmoji_Bombs]',
- '[咖啡]': '[TUIEmoji_Coffee]',
- '[蛋糕]': '[TUIEmoji_Cake]',
- '[啤酒]': '[TUIEmoji_Beer]',
- '[花]': '[TUIEmoji_Flower]',
- '[瓜]': '[TUIEmoji_Watermelon]',
- '[壕]': '[TUIEmoji_Rich]',
- '[爱心]': '[TUIEmoji_Heart]',
- '[月亮]': '[TUIEmoji_Moon]',
- '[太阳]': '[TUIEmoji_Sun]',
- '[星星]': '[TUIEmoji_Star]',
- '[红包]': '[TUIEmoji_RedPacket]',
- '[庆祝]': '[TUIEmoji_Celebrate]',
- '[福]': '[TUIEmoji_Bless]',
- '[发]': '[TUIEmoji_Fortune]',
- '[服]': '[TUIEmoji_Convinced]',
- '[禁]': '[TUIEmoji_Prohibit]',
- '[666]': '[TUIEmoji_666]',
- '[857]': '[TUIEmoji_857]',
- '[刀]': '[TUIEmoji_Knife]',
- '[赞]': '[TUIEmoji_Like]',
- '[Smile]': '[TUIEmoji_Smile]',
- '[Expect]': '[TUIEmoji_Expect]',
- '[Blink]': '[TUIEmoji_Blink]',
- '[Guffaw]': '[TUIEmoji_Guffaw]',
- '[KindSmile]': '[TUIEmoji_KindSmile]',
- '[Haha]': '[TUIEmoji_Haha]',
- '[Cheerful]': '[TUIEmoji_Cheerful]',
- '[Speechless]': '[TUIEmoji_Speechless]',
- '[Amazed]': '[TUIEmoji_Amazed]',
- '[Sorrow]': '[TUIEmoji_Sorrow]',
- '[Complacent]': '[TUIEmoji_Complacent]',
- '[Silly]': '[TUIEmoji_Silly]',
- '[Lustful]': '[TUIEmoji_Lustful]',
- '[Giggle]': '[TUIEmoji_Giggle]',
- '[Kiss]': '[TUIEmoji_Kiss]',
- '[Wail]': '[TUIEmoji_Wail]',
- '[TearsLaugh]': '[TUIEmoji_TearsLaugh]',
- '[Trapped]': '[TUIEmoji_Trapped]',
- '[Mask]': '[TUIEmoji_Mask]',
- '[Fear]': '[TUIEmoji_Fear]',
- '[BareTeeth]': '[TUIEmoji_BareTeeth]',
- '[FlareUp]': '[TUIEmoji_FlareUp]',
- '[Yawn]': '[TUIEmoji_Yawn]',
- '[Tact]': '[TUIEmoji_Tact]',
- '[StarEyes]': '[TUIEmoji_Stareyes]',
- '[ShutUp]': '[TUIEmoji_ShutUp]',
- '[Sigh]': '[TUIEmoji_Sigh]',
- '[Hehe]': '[TUIEmoji_Hehe]',
- '[Silent]': '[TUIEmoji_Silent]',
- '[Surprised]': '[TUIEmoji_Surprised]',
- '[Askance]]': '[TUIEmoji_Askance]',
- '[Shit]': '[TUIEmoji_Shit]',
- '[Monster]': '[TUIEmoji_Monster]',
- '[Daemon]': '[TUIEmoji_Daemon]',
- '[Rage]': '[TUIEmoji_Rage]',
- '[Fool]': '[TUIEmoji_Fool]',
- '[Pig]': '[TUIEmoji_Pig]',
- '[Cow]': '[TUIEmoji_Cow]',
- '[Skull]': '[TUIEmoji_Skull]',
- '[Bombs]': '[TUIEmoji_Bombs]',
- '[Coffee]': '[TUIEmoji_Coffee]',
- '[Cake]': '[TUIEmoji_Cake]',
- '[Beer]': '[TUIEmoji_Beer]',
- '[Flower]': '[TUIEmoji_Flower]',
- '[Watermelon]': '[TUIEmoji_Watermelon]',
- '[Rich]': '[TUIEmoji_Rich]',
- '[Heart]': '[TUIEmoji_Heart]',
- '[Moon]': '[TUIEmoji_Moon]',
- '[Sun]': '[TUIEmoji_Sun]',
- '[Star]': '[TUIEmoji_Star]',
- '[RedPacket]': '[TUIEmoji_RedPacket]',
- '[Celebrate]': '[TUIEmoji_Celebrate]',
- '[Bless]': '[TUIEmoji_Bless]',
- '[Fortune]': '[TUIEmoji_Fortune]',
- '[Convinced]': '[TUIEmoji_Convinced]',
- '[Prohibit]': '[TUIEmoji_Prohibit]',
- '[Knife]': '[TUIEmoji_Knife]',
- '[Like]': '[TUIEmoji_Like]'
-};
-const emojiUrlMapping: Record = {
- '[TUIEmoji_Expect]': 'emoji_0@2x.png',
- '[TUIEmoji_Blink]': 'emoji_1@2x.png',
- '[TUIEmoji_Guffaw]': 'emoji_2@2x.png',
- '[TUIEmoji_KindSmile]': 'emoji_3@2x.png',
- '[TUIEmoji_Haha]': 'emoji_4@2x.png',
- '[TUIEmoji_Cheerful]': 'emoji_5@2x.png',
- '[TUIEmoji_Smile]': 'emoji_6@2x.png',
- '[TUIEmoji_Sorrow]': 'emoji_7@2x.png',
- '[TUIEmoji_Speechless]': 'emoji_8@2x.png',
- '[TUIEmoji_Amazed]': 'emoji_9@2x.png',
- '[TUIEmoji_Complacent]': 'emoji_10@2x.png',
- '[TUIEmoji_Lustful]': 'emoji_11@2x.png',
- '[TUIEmoji_Stareyes]': 'emoji_12@2x.png',
- '[TUIEmoji_Giggle]': 'emoji_13@2x.png',
- '[TUIEmoji_Daemon]': 'emoji_14@2x.png',
- '[TUIEmoji_Rage]': 'emoji_15@2x.png',
- '[TUIEmoji_Yawn]': 'emoji_16@2x.png',
- '[TUIEmoji_TearsLaugh]': 'emoji_17@2x.png',
- '[TUIEmoji_Silly]': 'emoji_18@2x.png',
- '[TUIEmoji_Wail]': 'emoji_19@2x.png',
- '[TUIEmoji_Kiss]': 'emoji_20@2x.png',
- '[TUIEmoji_Trapped]': 'emoji_21@2x.png',
- '[TUIEmoji_Fear]': 'emoji_22@2x.png',
- '[TUIEmoji_BareTeeth]': 'emoji_23@2x.png',
- '[TUIEmoji_FlareUp]': 'emoji_24@2x.png',
- '[TUIEmoji_Tact]': 'emoji_25@2x.png',
- '[TUIEmoji_Shit]': 'emoji_26@2x.png',
- '[TUIEmoji_ShutUp]': 'emoji_27@2x.png',
- '[TUIEmoji_Sigh]': 'emoji_28@2x.png',
- '[TUIEmoji_Hehe]': 'emoji_29@2x.png',
- '[TUIEmoji_Silent]': 'emoji_30@2x.png',
- '[TUIEmoji_Skull]': 'emoji_31@2x.png',
- '[TUIEmoji_Mask]': 'emoji_32@2x.png',
- '[TUIEmoji_Beer]': 'emoji_33@2x.png',
- '[TUIEmoji_Cake]': 'emoji_34@2x.png',
- '[TUIEmoji_RedPacket]': 'emoji_35@2x.png',
- '[TUIEmoji_Bombs]': 'emoji_36@2x.png',
- '[TUIEmoji_Ai]': 'emoji_37@2x.png',
- '[TUIEmoji_Celebrate]': 'emoji_38@2x.png',
- '[TUIEmoji_Bless]': 'emoji_39@2x.png',
- '[TUIEmoji_Flower]': 'emoji_40@2x.png',
- '[TUIEmoji_Watermelon]': 'emoji_41@2x.png',
- '[TUIEmoji_Cow]': 'emoji_42@2x.png',
- '[TUIEmoji_Fool]': 'emoji_43@2x.png',
- '[TUIEmoji_Surprised]': 'emoji_44@2x.png',
- '[TUIEmoji_Askance]': 'emoji_45@2x.png',
- '[TUIEmoji_Monster]': 'emoji_46@2x.png',
- '[TUIEmoji_Pig]': 'emoji_47@2x.png',
- '[TUIEmoji_Coffee]': 'emoji_48@2x.png',
- '[TUIEmoji_Ok]': 'emoji_49@2x.png',
- '[TUIEmoji_Heart]': 'emoji_50@2x.png',
- '[TUIEmoji_Sun]': 'emoji_51@2x.png',
- '[TUIEmoji_Moon]': 'emoji_52@2x.png',
- '[TUIEmoji_Star]': 'emoji_53@2x.png',
- '[TUIEmoji_Rich]': 'emoji_54@2x.png',
- '[TUIEmoji_Fortune]': 'emoji_55@2x.png',
- '[TUIEmoji_857]': 'emoji_56@2x.png',
- '[TUIEmoji_666]': 'emoji_57@2x.png',
- '[TUIEmoji_Prohibit]': 'emoji_58@2x.png',
- '[TUIEmoji_Convinced]': 'emoji_59@2x.png',
- '[TUIEmoji_Knife]': 'emoji_60@2x.png',
- '[TUIEmoji_Like]': 'emoji_61@2x.png',
-};
-const deprecatedEmojiMap: Record = {
- '[NO]': 'emoji_0@2x.png',
- '[OK]': 'emoji_1@2x.png',
- '[下雨]': 'emoji_2@2x.png',
- '[么么哒]': 'emoji_3@2x.png',
- '[乒乓]': 'emoji_4@2x.png',
- '[便便]': 'emoji_5@2x.png',
- '[信封]': 'emoji_6@2x.png',
- '[偷笑]': 'emoji_7@2x.png',
- '[傲慢]': 'emoji_8@2x.png',
- '[再见]': 'emoji_9@2x.png',
- '[冷汗]': 'emoji_10@2x.png',
- '[凋谢]': 'emoji_11@2x.png',
- '[刀]': 'emoji_12@2x.png',
- '[删除]': 'emoji_13@2x.png',
- '[勾引]': 'emoji_14@2x.png',
- '[发呆]': 'emoji_15@2x.png',
- '[发抖]': 'emoji_16@2x.png',
- '[可怜]': 'emoji_17@2x.png',
- '[可爱]': 'emoji_18@2x.png',
- '[右哼哼]': 'emoji_19@2x.png',
- '[右太极]': 'emoji_20@2x.png',
- '[右车头]': 'emoji_21@2x.png',
- '[吐]': 'emoji_22@2x.png',
- '[吓]': 'emoji_23@2x.png',
- '[咒骂]': 'emoji_24@2x.png',
- '[咖啡]': 'emoji_25@2x.png',
- '[啤酒]': 'emoji_26@2x.png',
- '[嘘]': 'emoji_27@2x.png',
- '[回头]': 'emoji_28@2x.png',
- '[困]': 'emoji_29@2x.png',
- '[坏笑]': 'emoji_30@2x.png',
- '[多云]': 'emoji_31@2x.png',
- '[大兵]': 'emoji_32@2x.png',
- '[大哭]': 'emoji_33@2x.png',
- '[太阳]': 'emoji_34@2x.png',
- '[奋斗]': 'emoji_35@2x.png',
- '[奶瓶]': 'emoji_36@2x.png',
- '[委屈]': 'emoji_37@2x.png',
- '[害羞]': 'emoji_38@2x.png',
- '[尴尬]': 'emoji_39@2x.png',
- '[左哼哼]': 'emoji_40@2x.png',
- '[左太极]': 'emoji_41@2x.png',
- '[左车头]': 'emoji_42@2x.png',
- '[差劲]': 'emoji_43@2x.png',
- '[弱]': 'emoji_44@2x.png',
- '[强]': 'emoji_45@2x.png',
- '[彩带]': 'emoji_46@2x.png',
- '[彩球]': 'emoji_47@2x.png',
- '[得意]': 'emoji_48@2x.png',
- '[微笑]': 'emoji_49@2x.png',
- '[心碎了]': 'emoji_50@2x.png',
- '[快哭了]': 'emoji_51@2x.png',
- '[怄火]': 'emoji_52@2x.png',
- '[怒]': 'emoji_53@2x.png',
- '[惊恐]': 'emoji_54@2x.png',
- '[惊讶]': 'emoji_55@2x.png',
- '[憨笑]': 'emoji_56@2x.png',
- '[手枪]': 'emoji_57@2x.png',
- '[打哈欠]': 'emoji_58@2x.png',
- '[抓狂]': 'emoji_59@2x.png',
- '[折磨]': 'emoji_60@2x.png',
- '[抠鼻]': 'emoji_61@2x.png',
- '[抱抱]': 'emoji_62@2x.png',
- '[抱拳]': 'emoji_63@2x.png',
- '[拳头]': 'emoji_64@2x.png',
- '[挥手]': 'emoji_65@2x.png',
- '[握手]': 'emoji_66@2x.png',
- '[撇嘴]': 'emoji_67@2x.png',
- '[擦汗]': 'emoji_68@2x.png',
- '[敲打]': 'emoji_69@2x.png',
- '[晕]': 'emoji_70@2x.png',
- '[月亮]': 'emoji_71@2x.png',
- '[棒棒糖]': 'emoji_72@2x.png',
- '[汽车]': 'emoji_73@2x.png',
- '[沙发]': 'emoji_74@2x.png',
- '[流汗]': 'emoji_75@2x.png',
- '[流泪]': 'emoji_76@2x.png',
- '[激动]': 'emoji_77@2x.png',
- '[灯泡]': 'emoji_78@2x.png',
- '[炸弹]': 'emoji_79@2x.png',
- '[熊猫]': 'emoji_80@2x.png',
- '[爆筋]': 'emoji_81@2x.png',
- '[爱你]': 'emoji_82@2x.png',
- '[爱心]': 'emoji_83@2x.png',
- '[爱情]': 'emoji_84@2x.png',
- '[猪头]': 'emoji_85@2x.png',
- '[猫咪]': 'emoji_86@2x.png',
- '[献吻]': 'emoji_87@2x.png',
- '[玫瑰]': 'emoji_88@2x.png',
- '[瓢虫]': 'emoji_89@2x.png',
- '[疑问]': 'emoji_90@2x.png',
- '[白眼]': 'emoji_91@2x.png',
- '[皮球]': 'emoji_92@2x.png',
- '[睡觉]': 'emoji_93@2x.png',
- '[磕头]': 'emoji_94@2x.png',
- '[示爱]': 'emoji_95@2x.png',
- '[礼品袋]': 'emoji_96@2x.png',
- '[礼物]': 'emoji_97@2x.png',
- '[篮球]': 'emoji_98@2x.png',
- '[米饭]': 'emoji_99@2x.png',
- '[糗大了]': 'emoji_100@2x.png',
- '[红双喜]': 'emoji_101@2x.png',
- '[红灯笼]': 'emoji_102@2x.png',
- '[纸巾]': 'emoji_103@2x.png',
- '[胜利]': 'emoji_104@2x.png',
- '[色]': 'emoji_105@2x.png',
- '[药]': 'emoji_106@2x.png',
- '[菜刀]': 'emoji_107@2x.png',
- '[蛋糕]': 'emoji_108@2x.png',
- '[蜡烛]': 'emoji_109@2x.png',
- '[街舞]': 'emoji_110@2x.png',
- '[衰]': 'emoji_111@2x.png',
- '[西瓜]': 'emoji_112@2x.png',
- '[调皮]': 'emoji_113@2x.png',
- '[象棋]': 'emoji_114@2x.png',
- '[跳绳]': 'emoji_115@2x.png',
- '[跳跳]': 'emoji_116@2x.png',
- '[车厢]': 'emoji_117@2x.png',
- '[转圈]': 'emoji_118@2x.png',
- '[鄙视]': 'emoji_119@2x.png',
- '[酷]': 'emoji_120@2x.png',
- '[钞票]': 'emoji_121@2x.png',
- '[钻戒]': 'emoji_122@2x.png',
- '[闪电]': 'emoji_123@2x.png',
- '[闭嘴]': 'emoji_124@2x.png',
- '[闹钟]': 'emoji_125@2x.png',
- '[阴险]': 'emoji_126@2x.png',
- '[难过]': 'emoji_127@2x.png',
- '[雨伞]': 'emoji_128@2x.png',
- '[青蛙]': 'emoji_129@2x.png',
- '[面条]': 'emoji_130@2x.png',
- '[鞭炮]': 'emoji_131@2x.png',
- '[风车]': 'emoji_132@2x.png',
- '[飞吻]': 'emoji_133@2x.png',
- '[飞机]': 'emoji_134@2x.png',
- '[饥饿]': 'emoji_135@2x.png',
- '[香蕉]': 'emoji_136@2x.png',
- '[骷髅]': 'emoji_137@2x.png',
- '[麦克风]': 'emoji_138@2x.png',
- '[麻将]': 'emoji_139@2x.png',
- '[鼓掌]': 'emoji_140@2x.png',
- '[龇牙]': 'emoji_141@2x.png',
-};
-export const emojiList = Object.keys(emojiMap);
-
-export function decodeMessageText(payload: string) {
- const renderDom: { name: string; text?: string; src?: string; }[] = [];
- function pushTextNode(text: string) {
- renderDom.push({
- name: 'text',
- text,
- });
- }
-
- function pushEmojiNode(src: string) {
- renderDom.push({
- name: 'img',
- src,
- });
- }
-
- /**
- * Text Message
- *
- **/
- let temp = payload;
- let left = -1;
- let right = -1;
- while (temp !== '') {
- left = temp.indexOf('[');
- right = temp.indexOf(']');
- switch (left) {
- case 0:
- if (right === -1) {
- pushTextNode(temp);
- temp = '';
- } else {
- const emojiKey = temp.slice(0, right + 1);
- const emojiSrc = emojiUrlMapping[emojiKey]
- ? emojiBaseUrl + emojiUrlMapping[emojiKey]
- : deprecatedEmojiMap[emojiKey]
- ? deprecatedEmojiBaseUrl + deprecatedEmojiMap[emojiKey]
- : null;
- if (emojiSrc) {
- pushEmojiNode(emojiSrc);
- temp = temp.substring(right + 1);
- } else {
- pushTextNode('[');
- temp = temp.slice(1);
- }
- }
- break;
- case -1:
- pushTextNode(temp);
- temp = '';
- break;
- default:
- pushTextNode(temp.slice(0, left));
- temp = temp.substring(left);
- break;
- }
- }
- return renderDom;
-}
-
-export function decodeSendTextMsg(payload: string) {
- /**
- * Text Message
- *
- **/
- let temp = payload;
- let left = -1;
- let right = -1;
- let result = '';
-
- while (temp !== '') {
- temp = temp.replace('\n', '');
- left = temp.indexOf('[');
- right = temp.indexOf(']');
-
- switch (left) {
- case 0:
- if (right === -1) {
- result += temp;
- temp = '';
- } else {
- const emojiKey = temp.slice(0, right + 1);
- if (emojiKey in emojiNameMapping) {
- result += emojiNameMapping[emojiKey];
- temp = temp.substring(right + 1);
- } else {
- result += '[';
- temp = temp.slice(1);
- }
- }
- break;
- case -1:
- result += temp;
- temp = '';
- break;
- default:
- result += temp.slice(0, left);
- temp = temp.substring(left);
- break;
- }
- }
- return result;
-}
diff --git a/src/TUILiveKit/components/LiveMoreTool/Index.vue b/src/TUILiveKit/components/LiveMoreTool/Index.vue
deleted file mode 100644
index 35fca8d..0000000
--- a/src/TUILiveKit/components/LiveMoreTool/Index.vue
+++ /dev/null
@@ -1,146 +0,0 @@
-
-
-
-
-
-
-
diff --git a/src/TUILiveKit/components/LivePreview/Index.vue b/src/TUILiveKit/components/LivePreview/Index.vue
deleted file mode 100644
index 0598337..0000000
--- a/src/TUILiveKit/components/LivePreview/Index.vue
+++ /dev/null
@@ -1,334 +0,0 @@
-
-
-
-
- {{ roomName }}
- {{ roomId }}
-
-
-
- {{ remoteUserList.length }}{{ t("viewer") }}
-
-
-
-
-
-
-
-
-
diff --git a/src/TUILiveKit/components/LivePreview/useContextMenu.ts b/src/TUILiveKit/components/LivePreview/useContextMenu.ts
deleted file mode 100644
index 58e37cd..0000000
--- a/src/TUILiveKit/components/LivePreview/useContextMenu.ts
+++ /dev/null
@@ -1,109 +0,0 @@
-import { ref, Ref, onMounted, onUnmounted, nextTick } from 'vue';
-import { TRTCMediaSource, TRTCMediaMixingEvent } from 'trtc-electron-sdk';
-import { TUIMediaMixingError, TUIMediaSourceViewModel } from '../../types';
-import useMediaMixingManager from '../../utils/useMediaMixingManager';
-import { useMediaSourcesStore } from '../../store/main/mediaSources';
-import onMediaMixingError from '../../hooks/useMediaMixingErrorHandler';
-import logger from '../../utils/logger';
-
-const logPrefix = '[useContextMenu]';
-
-const mediaMixingManager = useMediaMixingManager();
-
-function useContextMenu() {
- const contextCommand: Ref = ref('');
- const selectedMediaSource: Ref = ref(null);
- const mediaSourcesStore = useMediaSourcesStore();
-
- window.ipcRenderer.on('context-menu-command', async (event: any, command: string) => {
- console.log(`${logPrefix}context-menu-command:`, command);
- if (selectedMediaSource.value) {
- switch (command) {
- case 'move-up':
- mediaSourcesStore.changeMediaOrder(selectedMediaSource.value, 1);
- break;
- case 'move-down':
- mediaSourcesStore.changeMediaOrder(selectedMediaSource.value, -1);
- break;
- case 'move-top':
- mediaSourcesStore.moveMediaTop(selectedMediaSource.value);
- break;
- case 'move-bottom':
- mediaSourcesStore.moveMediaBottom(selectedMediaSource.value);
- break;
- case 'transform-clockwise-90':
- mediaSourcesStore.rotateMediaSource(selectedMediaSource.value, 90);
- break;
- case 'transform-anti-clockwise-90':
- mediaSourcesStore.rotateMediaSource(selectedMediaSource.value, -90);
- break;
- case 'transform-mirror-horizontal':
- mediaSourcesStore.toggleHorizontalMirror(selectedMediaSource.value);
- break;
- case 'transform-mirror-vertical':
- break;
- case 'hide':
- mediaSourcesStore.muteMediaSource(selectedMediaSource.value, true);
- break;
- case 'edit':
- contextCommand.value = command;
- break;
- case 'remove':
- try {
- await mediaSourcesStore.removeMediaSource(selectedMediaSource.value);
- } catch (error) {
- onMediaMixingError(error as TUIMediaMixingError);
- }
- break;
- default:
- console.warn(`[LivePreview]context-menu-command: command not supported: ${command}`);
- break;
- }
- }
- await nextTick();
- contextCommand.value = '';
- });
-
- const onContextMenu = (mediaSource: TRTCMediaSource) => {
- console.log(`${logPrefix}onContextMenu current selected media source:`, mediaSource);
- if (mediaSource) {
- const selected = mediaSourcesStore.mediaList.find(item => item.mediaSourceInfo.sourceId === mediaSource.sourceId
- && item.mediaSourceInfo.sourceType === mediaSource.sourceType
- );
- if (selected) {
- selectedMediaSource.value = selected;
- window.ipcRenderer.send('show-context-menu');
- } else {
- selectedMediaSource.value = null;
- }
- } else {
- selectedMediaSource.value = null;
- }
- };
-
- const addContextMenu = () => {
- logger.log(`${logPrefix} addContextMenu:`);
- mediaMixingManager.on(TRTCMediaMixingEvent.onRightButtonClicked, onContextMenu);
- };
-
- const removeContextMenu = () => {
- logger.log(`${logPrefix} removeContextMenu:`);
- mediaMixingManager.off(TRTCMediaMixingEvent.onRightButtonClicked, onContextMenu);
- };
-
- onMounted(() => {
- logger.log(`${logPrefix} onMounted:`);
- addContextMenu();
- });
-
- onUnmounted(() => {
- logger.log(`${logPrefix} onUnmounted:`);
- removeContextMenu();
- });
-
- return {
- contextCommand,
- }
-}
-
-export default useContextMenu;
diff --git a/src/TUILiveKit/components/LiveSource/LiveImageSource.vue b/src/TUILiveKit/components/LiveSource/LiveImageSource.vue
deleted file mode 100644
index a8e1395..0000000
--- a/src/TUILiveKit/components/LiveSource/LiveImageSource.vue
+++ /dev/null
@@ -1,194 +0,0 @@
-
-
-
-
-
- {{ t('Add Image') }}
-
- {{ t('Edit source') }}
-
-
-
-
-
diff --git a/src/TUILiveKit/components/LiveSource/imageStorage.ts b/src/TUILiveKit/components/LiveSource/imageStorage.ts
deleted file mode 100644
index 6b08f8e..0000000
--- a/src/TUILiveKit/components/LiveSource/imageStorage.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-const imageStorage: Map = new Map();
-
-export default imageStorage;
\ No newline at end of file
diff --git a/src/TUILiveKit/components/v2/CoGuestPanel/i18n/en-US/index.ts b/src/TUILiveKit/components/v2/CoGuestPanel/i18n/en-US/index.ts
deleted file mode 100644
index ffa9316..0000000
--- a/src/TUILiveKit/components/v2/CoGuestPanel/i18n/en-US/index.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-export const resource = {
- 'Application for live': 'Application for live',
- 'Invite for live': 'Invite for live',
- 'Co-guest management': 'Co-guest management',
- 'Seat is empty': 'Seat is empty',
- 'No invited users yet': 'No invited users yet',
- 'Current seat': 'Current seat',
- 'Accept': 'Accept',
- 'Reject': 'Reject',
- 'Disconnect': 'Disconnect',
- 'Cancel': 'Cancel',
- 'Invite': 'Invite',
- 'Invite more': 'Invite more',
- 'Inviting': 'Inviting',
- 'No application for live': 'No application for live',
- 'Me': 'Me',
- 'this seat is already occupied by others': 'This seat is already occupied by others',
- 'there is no available seat to take': 'There is no available seat to take',
- 'Accept co-guest request failed': 'Accept co-guest request failed',
- 'Reject co-guest request failed': 'Reject co-guest request failed',
-};
diff --git a/src/TUILiveKit/components/v2/CoGuestPanel/i18n/index.ts b/src/TUILiveKit/components/v2/CoGuestPanel/i18n/index.ts
deleted file mode 100644
index 3078eed..0000000
--- a/src/TUILiveKit/components/v2/CoGuestPanel/i18n/index.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-import { resource as enResource } from './en-US/index';
-import { resource as zhResource } from './zh-CN/index';
-
-export { enResource, zhResource };
diff --git a/src/TUILiveKit/components/v2/CoGuestPanel/i18n/zh-CN/index.ts b/src/TUILiveKit/components/v2/CoGuestPanel/i18n/zh-CN/index.ts
deleted file mode 100644
index 943d2aa..0000000
--- a/src/TUILiveKit/components/v2/CoGuestPanel/i18n/zh-CN/index.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-export const resource = {
- 'Application for live': '连麦申请',
- 'Invite for live': '邀请连麦',
- 'Co-guest management': '连麦管理',
- 'Seat is empty': '麦位空闲',
- 'No invited users yet': '暂无可邀请用户',
- 'Current seat': '当前麦位',
- 'Accept': '接受',
- 'Reject': '拒绝',
- 'Disconnect': '断开连麦',
- 'Cancel': '取消',
- 'Invite': '邀请',
- 'Invite more': '邀请更多',
- 'Inviting': '邀请中',
- 'No application for live': '暂无连麦申请',
- 'Me': '我',
- 'this seat is already occupied by others': '该麦位已被占用',
- 'there is no available seat to take': '暂无可用麦位',
- 'Accept co-guest request failed': '接受连麦请求失败',
- 'Reject co-guest request failed': '拒绝连麦请求失败',
-};
diff --git a/src/TUILiveKit/components/v2/CoGuestPanel/index.ts b/src/TUILiveKit/components/v2/CoGuestPanel/index.ts
index 21c55dd..c9917af 100644
--- a/src/TUILiveKit/components/v2/CoGuestPanel/index.ts
+++ b/src/TUILiveKit/components/v2/CoGuestPanel/index.ts
@@ -1,7 +1,4 @@
-import { addI18n } from 'tuikit-atomicx-vue3-electron';
import CoGuestPanelPC from './CoGuestPanelDialog.vue';
-import { enResource, zhResource } from './i18n';
-addI18n('en-US', { translation: enResource });
-addI18n('zh-CN', { translation: zhResource });
+
const CoGuestPanel = CoGuestPanelPC;
export default CoGuestPanel;
diff --git a/src/TUILiveKit/components/v2/LiveCoverUpload.vue b/src/TUILiveKit/components/v2/LiveCoverUpload.vue
index 01df76c..cdc9aec 100644
--- a/src/TUILiveKit/components/v2/LiveCoverUpload.vue
+++ b/src/TUILiveKit/components/v2/LiveCoverUpload.vue
@@ -69,6 +69,7 @@
{
return '';
}
-function switchCoverType(type: CoverType) {
- if (props.coverType === type) {
- return;
- }
- emit('update:coverType', type);
- emit('update:modelValue', '');
-}
-
function showUploadUnavailableTip() {
TUIToast.info({
message: t('Upload is unavailable. Please enter cover URL manually'),
@@ -231,7 +224,6 @@ function handleCardClick(type: CoverType) {
if (isUploading.value) {
return;
}
- switchCoverType(type);
if (!props.uploadEnabled) {
showUploadUnavailableTip();
return;
@@ -249,7 +241,6 @@ async function handleDrop(event: DragEvent, type: CoverType) {
if (isUploading.value) {
return;
}
- switchCoverType(type);
if (!props.uploadEnabled) {
showUploadUnavailableTip();
return;
@@ -281,6 +272,9 @@ async function processUploadFile(selectedFile: File, type: CoverType) {
file: selectedFile,
type: 'cover',
});
+ if (props.coverType !== type) {
+ emit('update:coverType', type);
+ }
emit('update:modelValue', uploadResult.url);
emit('upload-success', { url: uploadResult.url });
} catch (error: unknown) {
diff --git a/src/TUILiveKit/components/v2/LiveHeader/LiveTitleSettingDialog.vue b/src/TUILiveKit/components/v2/LiveHeader/LiveTitleSettingDialog.vue
index c8c773b..879f81a 100644
--- a/src/TUILiveKit/components/v2/LiveHeader/LiveTitleSettingDialog.vue
+++ b/src/TUILiveKit/components/v2/LiveHeader/LiveTitleSettingDialog.vue
@@ -17,11 +17,12 @@
{{ t('LiveName') }}
@@ -63,6 +64,8 @@ import {
UPLOAD_MAX_FILE_SIZE_MB,
UploadConfig,
} from '../../../../api/upload';
+import { LIVE_NAME_MAX_UTF8_BYTES } from '../../../constants/tuiConstant';
+import { getUtf8ByteLength } from '../../../utils/utils';
import LiveCoverUpload from '../LiveCoverUpload.vue';
type CoverType = 'landscape' | 'portrait';
@@ -86,7 +89,7 @@ const uploadConfig = ref({
});
const dialogId = computed(() => props.data?.dialogId || '');
-const maxLength = computed(() => props.data?.maxLength || 20);
+const maxUtf8Bytes = computed(() => props.data?.maxLength || LIVE_NAME_MAX_UTF8_BYTES);
const maxFileSizeMB = UPLOAD_MAX_FILE_SIZE_MB;
const allowedMimeTypes = UPLOAD_ALLOWED_MIME_TYPES;
const uploadEnabled = computed(() => Boolean(uploadConfig.value.enabled));
@@ -116,11 +119,15 @@ watch(localLiveName, () => {
}
});
+function handleLiveNameInput(value: string | number) {
+ localLiveName.value = String(value ?? '');
+}
+
function validateLiveName(value: string) {
- if (!value) {
+ if (!value.trim()) {
return t('Please enter the live name');
}
- if (value.length > maxLength.value) {
+ if (getUtf8ByteLength(value) > maxUtf8Bytes.value) {
return t('Live name is too long');
}
return '';
@@ -143,7 +150,7 @@ function handleCancel() {
}
function handleConfirm() {
- const value = localLiveName.value.trim();
+ const value = localLiveName.value;
const error = validateLiveName(value);
if (error) {
liveNameError.value = error;
diff --git a/src/TUILiveKit/components/v2/LiveHeader/index.vue b/src/TUILiveKit/components/v2/LiveHeader/index.vue
index 1ea3b04..fb0fb96 100644
--- a/src/TUILiveKit/components/v2/LiveHeader/index.vue
+++ b/src/TUILiveKit/components/v2/LiveHeader/index.vue
@@ -14,6 +14,40 @@
+
+
+
+
+
diff --git a/src/views/Login/SecretKeyForm.vue b/src/views/Login/SecretKeyForm.vue
index 57b6a96..15f74ea 100644
--- a/src/views/Login/SecretKeyForm.vue
+++ b/src/views/Login/SecretKeyForm.vue
@@ -34,7 +34,7 @@
diff --git a/src/views/Login/UserSigForm.vue b/src/views/Login/UserSigForm.vue
index 4df7c1c..14efa3b 100644
--- a/src/views/Login/UserSigForm.vue
+++ b/src/views/Login/UserSigForm.vue
@@ -43,7 +43,7 @@
-
-
diff --git a/src/views/TUILiveKitCover.vue b/src/views/TUILiveKitCover.vue
deleted file mode 100644
index 19efe33..0000000
--- a/src/views/TUILiveKitCover.vue
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
-
diff --git a/src/views/TUILiveKitCoverV2.vue b/src/views/TUILiveKitCoverV2.vue
index 631e145..47e865c 100644
--- a/src/views/TUILiveKitCoverV2.vue
+++ b/src/views/TUILiveKitCoverV2.vue
@@ -1,8 +1,11 @@
-
+
+
+
diff --git a/src/views/TUILiveKitMacV2.vue b/src/views/TUILiveKitMacV2.vue
index 1fab396..838613b 100644
--- a/src/views/TUILiveKitMacV2.vue
+++ b/src/views/TUILiveKitMacV2.vue
@@ -18,18 +18,18 @@
- {{ currentLive?.liveName || liveParams.liveName }}
+
+ {{ currentLive?.liveName || liveParams.liveName }}
+
-
@@ -145,7 +145,6 @@ import { onMounted, onBeforeUnmount, computed, ref } from 'vue';
import { useRouter } from 'vue-router';
import trtcCloud from '../TUILiveKit/utils/trtcCloud';
import {
- IconCopy,
IconEndLive,
IconLiveLoading,
IconLiveStart,
@@ -167,6 +166,10 @@ import {
LiveAudienceList,
BarrageList,
BarrageInput,
+ useLiveErrorModal,
+ LiveListEvent,
+ LiveEndedReason,
+ LiveListEventInfo,
} from 'tuikit-atomicx-vue3-electron';
import TUIRoomEngine, { TUISeatMode } from '@tencentcloud/tuiroom-engine-electron';
import { useElectronLogin } from '../TUILiveKit/hooks/useElectronLogin';
@@ -179,11 +182,17 @@ import SettingButton from '../TUILiveKit/components/v2/SettingButton.vue';
import SpeakerVolumeSetting from '../TUILiveKit/components/v2/SpeakerVolumeSetting.vue';
import LiveHeader from '../TUILiveKit/components/v2/LiveHeader/index.vue';
import LiveSettingButton from '../TUILiveKit/components/v2/LiveSettingButton.vue';
+import LiveURLCopy from '../TUILiveKit/components/v2/LiveURLCopy.vue';
import LivePusherNotification from '../TUILiveKit/components/v2/LivePusherNotification.vue';
-import { copyToClipboard, isNetworkOffline, isNetworkTimeoutError } from '../TUILiveKit/utils/utils';
+import {
+ isNetworkOffline,
+ isNetworkTimeoutError,
+ isSvgCoverUrl,
+} from '../TUILiveKit/utils/utils';
import { USER_INFO_STORAGE_KEY } from '../TUILiveKit/utils/userInfoStorage';
import { useSystemAudioLoopback } from '../TUILiveKit/hooks/useSystemAudioLoopback';
import useRoomEngine from '../TUILiveKit/utils/useRoomEngine';
+import { mapToRoomEngineLanguage } from '../TUILiveKit/utils/common';
console.log('TRTC SDK version:', trtcCloud.getSDKVersion());
@@ -197,7 +206,8 @@ const props = defineProps<{
seatMode?: TUISeatMode;
}>();
-const { currentLive, createLive, endLive, joinLive } = useLiveListState();
+const { currentLive, createLive, endLive, joinLive, subscribeEvent, unsubscribeEvent } = useLiveListState();
+const { handleErrorWithModal } = useLiveErrorModal();
const { audienceCount } = useLiveAudienceState();
const { openLocalMicrophone } = useDeviceState();
const { connected: coGuestConnected } = useCoGuestState();
@@ -307,7 +317,7 @@ const handleCreateLive = async () => {
await TUIRoomEngine.callExperimentalAPI(JSON.stringify({
api: 'setCurrentLanguage',
params: {
- language: language.value === 'zh-CN' ? 'zh-Hans' : 'en',
+ language: mapToRoomEngineLanguage(language.value),
},
}));
await createLive({
@@ -338,6 +348,9 @@ const handleCreateLive = async () => {
startSystemAudioLoopbackSafely();
return;
}
+ if (handleErrorWithModal(error)) {
+ return;
+ }
TUIToast.error({
message: t('Failed to create live'),
});
@@ -366,6 +379,10 @@ const handleEndLive = async (options: { showErrorToast?: boolean } = {}): Promis
TUIToast.error({
message: t('Network error, please check your connection and try again'),
});
+ return false;
+ }
+ if (showErrorToast && handleErrorWithModal(error)) {
+ return false;
}
exitLiveDialogVisible.value = false;
return false;
@@ -416,7 +433,28 @@ const handleAppRequestQuit = () => {
});
};
+const handleLiveEnded = (eventInfo: LiveListEventInfo) => {
+ if (eventInfo.reason === LiveEndedReason.endedByHost) {
+ return;
+ }
+ if (eventInfo.reason === LiveEndedReason.endedByServer) {
+ TUIToast.warning({
+ message: t('Stream closed due to content violation'),
+ duration: 5000,
+ });
+ return;
+ }
+ // Fallback for unknown ending reasons
+ TUIToast.warning({
+ message: t('The live room has been closed'),
+ duration: 5000,
+ });
+};
+
onMounted(async () => {
+ // Subscribe to live ended event
+ subscribeEvent(LiveListEvent.onLiveEnded, handleLiveEnded);
+
// Setup event listeners
setupEventListeners();
if (window.ipcRenderer) {
@@ -450,6 +488,12 @@ const handleLiveSettingConfirm = async (form: { liveName: string; coverUrl?: str
liveName: form.liveName.trim(),
coverUrl: (form.coverUrl || '').trim(),
};
+ if (isSvgCoverUrl(updatedForm.coverUrl)) {
+ TUIToast.error({
+ message: t('Unsupported image format'),
+ });
+ return;
+ }
if (!isInLive.value || !currentLive.value?.liveId) {
liveParamsEditForm.value = updatedForm;
return;
@@ -493,27 +537,8 @@ const handleLiveSettingConfirm = async (form: { liveName: string; coverUrl?: str
}
};
-const handleCopyLiveID = async () => {
- if (!currentLive.value?.liveId) {
- TUIToast.error({
- message: t('Copy failed'),
- });
- return;
- }
-
- try {
- await copyToClipboard(currentLive.value?.liveId || '');
- TUIToast.success({
- message: t('Copy successful'),
- });
- } catch (error) {
- TUIToast.error({
- message: t('Copy failed'),
- });
- }
-};
-
onBeforeUnmount(() => {
+ unsubscribeEvent(LiveListEvent.onLiveEnded, handleLiveEnded);
stopSystemAudioLoopbackSafely();
cleanupEventListeners();
if (window.ipcRenderer) {
@@ -643,18 +668,21 @@ onBeforeUnmount(() => {
display: flex;
align-items: center;
gap: 8px;
-
- .copy-icon {
- cursor: pointer;
-
- &:hover {
- color: $icon-hover-color;
- }
+ flex: 1;
+ min-width: 0;
+
+ .live-title {
+ min-width: 0;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
}
}
.main-center-top-right {
@include text-size-12;
+ flex-shrink: 0;
+ margin-left: 12px;
}
&::after {
diff --git a/src/views/TUILiveKitMain.vue b/src/views/TUILiveKitMain.vue
deleted file mode 100644
index 68d5506..0000000
--- a/src/views/TUILiveKitMain.vue
+++ /dev/null
@@ -1,148 +0,0 @@
-
-
-
-
-
-
-
diff --git a/src/views/TUILiveKitMainV2.vue b/src/views/TUILiveKitMainV2.vue
index 5f7f291..76b77b7 100644
--- a/src/views/TUILiveKitMainV2.vue
+++ b/src/views/TUILiveKitMainV2.vue
@@ -18,7 +18,9 @@
- {{ currentLive?.liveName || liveParams.liveName }}
+
+ {{ currentLive?.liveName || liveParams.liveName }}
+
-
@@ -115,7 +115,7 @@
height="56px"
:disabled="!isInLive"
:placeholder="isInLive ? '' : t('Live not started')"
- emoji-popup-mode="rightSafe"
+ emoji-popup-mode="inset"
/>
@@ -134,7 +134,6 @@ import {
UIKitProvider,
useUIKit,
TUIButton,
- IconCopy,
IconLiveLoading,
IconLiveStart,
IconEndLive,
@@ -150,13 +149,21 @@ import {
useDeviceState,
useCoGuestState,
StreamMixer,
+ LiveListEvent,
+ LiveEndedReason,
+ LiveListEventInfo,
} from 'tuikit-atomicx-vue3-electron';
import { useElectronLogin, type ForceLogoutNoticePayload } from '../TUILiveKit/hooks/useElectronLogin';
import LiveHeader from '../TUILiveKit/components/v2/LiveHeader/index.vue';
import LiveScenePanel from '../TUILiveKit/components/v2/LiveScene/LiveScenePanel.vue';
import LiveSettingButton from '../TUILiveKit/components/v2/LiveSettingButton.vue';
+import LiveURLCopy from '../TUILiveKit/components/v2/LiveURLCopy.vue';
import CoGuestButton from '../TUILiveKit/components/v2/CoGuestButton.vue';
-import { copyToClipboard, isNetworkOffline, isNetworkTimeoutError } from '../TUILiveKit/utils/utils';
+import {
+ isNetworkOffline,
+ isNetworkTimeoutError,
+ isSvgCoverUrl,
+} from '../TUILiveKit/utils/utils';
import { getWindowID } from '../TUILiveKit/utils/envUtils';
import { TUIButtonAction, TUIButtonActionType } from '../TUILiveKit/types';
import {
@@ -175,6 +182,8 @@ import LayoutSwitch from '../TUILiveKit/components/v2/LayoutSwitch.vue';
import { USER_INFO_STORAGE_KEY } from '../TUILiveKit/utils/userInfoStorage';
import { useSystemAudioLoopback } from '../TUILiveKit/hooks/useSystemAudioLoopback';
import useRoomEngine from '../TUILiveKit/utils/useRoomEngine';
+import { mapToRoomEngineLanguage } from '../TUILiveKit/utils/common';
+import { LIVE_NAME_MAX_UTF8_BYTES } from '../TUILiveKit/constants/tuiConstant';
console.log('TRTC SDK version:', trtcCloud.getSDKVersion());
@@ -191,7 +200,7 @@ const props = defineProps<{
seatMode?: TUISeatMode;
}>();
-const { currentLive, createLive, endLive, joinLive } = useLiveListState();
+const { currentLive, createLive, endLive, joinLive, subscribeEvent, unsubscribeEvent } = useLiveListState();
const { audienceCount } = useLiveAudienceState();
const { openLocalMicrophone } = useDeviceState();
const { connected: coGuestConnected } = useCoGuestState();
@@ -289,7 +298,7 @@ const handleCreateLive = async () => {
await TUIRoomEngine.callExperimentalAPI(JSON.stringify({
api: 'setCurrentLanguage',
params: {
- language: language.value === 'zh-CN' ? 'zh-Hans' : 'en',
+ language: mapToRoomEngineLanguage(language.value),
},
}));
await createLive({
@@ -361,7 +370,7 @@ const showLiveSettingChildWindow = (form: { liveName: string; coverUrl?: string
dialogId,
liveName: pendingLiveSettingName.value,
coverUrl: pendingLiveSettingCoverUrl.value,
- maxLength: 20,
+ maxLength: LIVE_NAME_MAX_UTF8_BYTES,
},
});
};
@@ -647,7 +656,28 @@ onBeforeMount(async () => {
nativeId.value = await getWindowID();
});
+const handleLiveEnded = (eventInfo: LiveListEventInfo) => {
+ if (eventInfo.reason === LiveEndedReason.endedByHost) {
+ return;
+ }
+ if (eventInfo.reason === LiveEndedReason.endedByServer) {
+ TUIToast.warning({
+ message: t('Stream closed due to content violation'),
+ duration: 5000,
+ });
+ return;
+ }
+ // Fallback for unknown ending reasons
+ TUIToast.warning({
+ message: t('The live room has been closed'),
+ duration: 5000,
+ });
+};
+
onMounted(async () => {
+ // Subscribe to live ended event
+ subscribeEvent(LiveListEvent.onLiveEnded, handleLiveEnded);
+
// Setup event listeners
setupEventListeners();
ipcBridge.on(IPCMessageType.CONFIRM_DIALOG_ACTION, onConfirmDialogAction);
@@ -683,6 +713,12 @@ const handleLiveSettingConfirm = async (form: { liveName: string; coverUrl?: str
liveName: form.liveName.trim(),
coverUrl: (form.coverUrl || '').trim(),
};
+ if (isSvgCoverUrl(updatedForm.coverUrl)) {
+ TUIToast.error({
+ message: t('Unsupported image format'),
+ });
+ return;
+ }
if (!isInLive.value || !currentLive.value?.liveId) {
liveParamsEditForm.value = updatedForm;
return;
@@ -731,30 +767,8 @@ const handleLiveSettingConfirm = async (form: { liveName: string; coverUrl?: str
}
};
-const handleCopyLiveID = async () => {
- if (isTransitioningToLogin()) {
- return;
- }
- if (!currentLive.value?.liveId) {
- TUIToast.error({
- message: t('Copy failed'),
- });
- return;
- }
-
- try {
- await copyToClipboard(currentLive.value.liveId);
- TUIToast.success({
- message: t('Copy successful'),
- });
- } catch (error) {
- TUIToast.error({
- message: t('Copy failed'),
- });
- }
-};
-
onBeforeUnmount(() => {
+ unsubscribeEvent(LiveListEvent.onLiveEnded, handleLiveEnded);
if (loginRedirectTimer) {
clearTimeout(loginRedirectTimer);
loginRedirectTimer = null;
@@ -840,6 +854,7 @@ onBeforeUnmount(() => {
.main-center {
flex: 1;
+ min-width: 0;
display: flex;
flex-direction: column;
height: 100%;
@@ -862,18 +877,21 @@ onBeforeUnmount(() => {
display: flex;
align-items: center;
gap: 8px;
-
- .copy-icon {
- cursor: pointer;
-
- &:hover {
- color: $icon-hover-color;
- }
+ flex: 1;
+ min-width: 0;
+
+ .live-title {
+ min-width: 0;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
}
}
.main-center-top-right {
@include text-size-12;
+ flex-shrink: 0;
+ margin-left: 12px;
}
&::after {
diff --git a/upload-server/.gitignore b/upload-server/.gitignore
new file mode 100644
index 0000000..4c49bd7
--- /dev/null
+++ b/upload-server/.gitignore
@@ -0,0 +1 @@
+.env
diff --git a/upload-server/README.md b/upload-server/README.md
new file mode 100644
index 0000000..f72ec96
--- /dev/null
+++ b/upload-server/README.md
@@ -0,0 +1,23 @@
+# TUI LiveKit Upload Server
+
+This is the shared upload server used by the TUI LiveKit Electron and Web demos.
+
+## Start
+
+```bash
+npm install
+npm run start
+```
+
+## Configure
+
+Copy `.env.example` to `.env`, then configure one storage provider:
+
+- `cos`
+- `oss`
+- `custom`
+
+The service exposes:
+
+- `GET /api/upload/config`
+- `POST /api/upload/image`
diff --git a/upload-server/package.json b/upload-server/package.json
index 61e46ac..ecc1321 100644
--- a/upload-server/package.json
+++ b/upload-server/package.json
@@ -1,8 +1,8 @@
{
- "name": "tui-livekit-electron-upload-server",
+ "name": "tui-livekit-upload-server",
"version": "1.0.0",
"private": true,
- "description": "Standalone upload server for tui-livekit electron demo",
+ "description": "Shared upload server for TUI LiveKit demos",
"main": "src/index.js",
"scripts": {
"start": "node ./src/index.js",
diff --git a/upload-server/src/config/index.js b/upload-server/src/config/index.js
index ded500f..92abe66 100644
--- a/upload-server/src/config/index.js
+++ b/upload-server/src/config/index.js
@@ -4,7 +4,7 @@ const dotenv = require('dotenv');
dotenv.config({ path: path.resolve(__dirname, '../../.env') });
const DEFAULT_HOST = '0.0.0.0';
-const DEFAULT_PORT = 9000;
+const DEFAULT_PORT = 3071;
function parsePort(value, fallback) {
const parsed = Number(value);
diff --git a/upload-server/src/routes/uploadRouter.js b/upload-server/src/routes/uploadRouter.js
index 0ade0bb..407c001 100644
--- a/upload-server/src/routes/uploadRouter.js
+++ b/upload-server/src/routes/uploadRouter.js
@@ -10,11 +10,15 @@ const { asyncHandler } = require('../middleware/asyncHandler');
const logger = require('../utils/logger');
const MAX_FILE_SIZE_MB = 2;
-const ALLOWED_MIME_TYPES = [
+const MAX_FILE_SIZE_BYTES = MAX_FILE_SIZE_MB * 1024 * 1024;
+const COVER_ALLOWED_MIME_TYPES = [
'image/jpeg',
'image/png',
'image/gif',
'image/webp',
+];
+const ALLOWED_MIME_TYPES = [
+ ...COVER_ALLOWED_MIME_TYPES,
'image/svg+xml',
];
const ALLOWED_UPLOAD_TYPES = [
@@ -22,17 +26,45 @@ const ALLOWED_UPLOAD_TYPES = [
'gift-icon',
'gift-animation',
];
+const ALLOWED_MIME_TYPES_BY_UPLOAD_TYPE = {
+ cover: COVER_ALLOWED_MIME_TYPES,
+ 'gift-icon': ALLOWED_MIME_TYPES,
+ 'gift-animation': ALLOWED_MIME_TYPES,
+};
+
+function resolveUploadType(type) {
+ if (!type || !ALLOWED_UPLOAD_TYPES.includes(type)) {
+ return null;
+ }
+ return type;
+}
+
+function getAllowedMimeTypesByType(type) {
+ return ALLOWED_MIME_TYPES_BY_UPLOAD_TYPE[type] || COVER_ALLOWED_MIME_TYPES;
+}
+
+function getUnsupportedMimeMessage(type) {
+ if (type === 'cover') {
+ return 'Only JPG/PNG/GIF/WebP images are supported for cover';
+ }
+ return 'Only JPG/PNG/GIF/WebP/SVG images are supported';
+}
const upload = multer({
storage: multer.memoryStorage(),
- limits: { fileSize: MAX_FILE_SIZE_MB * 1024 * 1024 },
- fileFilter: (_req, file, callback) => {
- if (ALLOWED_MIME_TYPES.includes(file.mimetype)) {
+ // Use a slightly larger parser limit, then enforce precise business rule below.
+ // This avoids edge-case rejection when file size is exactly MAX_FILE_SIZE_BYTES.
+ limits: { fileSize: MAX_FILE_SIZE_BYTES + 1 },
+ fileFilter: (req, file, callback) => {
+ const uploadType = resolveUploadType(req.body?.type);
+ const allowedMimeTypes = uploadType ? getAllowedMimeTypesByType(uploadType) : ALLOWED_MIME_TYPES;
+ if (allowedMimeTypes.includes(file.mimetype)) {
callback(null, true);
return;
}
- const error = new Error('Only JPG/PNG/GIF/WebP/SVG images are supported');
+ const error = new Error(getUnsupportedMimeMessage(uploadType));
logger.warn('UPLOAD_FILE_FILTER', error.message, {
+ type: uploadType || req.body?.type,
mimetype: file.mimetype,
originalname: file.originalname,
});
@@ -104,8 +136,39 @@ uploadRouter.post(
res.status(400).json({ code: -1, message });
return;
}
+ if (req.file.size > MAX_FILE_SIZE_BYTES) {
+ const message = `File size cannot exceed ${MAX_FILE_SIZE_MB}MB`;
+ logger.warn('UPLOAD_FILE_SIZE_OVER_LIMIT', message, {
+ type: req.body?.type,
+ originalname: req.file.originalname,
+ size: req.file.size,
+ limit: MAX_FILE_SIZE_BYTES,
+ });
+ res.status(400).json({ code: -1, message });
+ return;
+ }
- const type = ALLOWED_UPLOAD_TYPES.includes(req.body.type) ? req.body.type : 'cover';
+ const type = resolveUploadType(req.body?.type);
+ if (!type) {
+ const message = 'Missing or invalid upload type';
+ logger.warn('UPLOAD_TYPE_INVALID', message, {
+ type: req.body?.type,
+ originalname: req.file.originalname,
+ });
+ res.status(400).json({ code: -1, message });
+ return;
+ }
+ const allowedMimeTypes = getAllowedMimeTypesByType(type);
+ if (!allowedMimeTypes.includes(req.file.mimetype)) {
+ const message = getUnsupportedMimeMessage(type);
+ logger.warn('UPLOAD_MIME_TYPE_NOT_ALLOWED', message, {
+ type,
+ mimetype: req.file.mimetype,
+ originalname: req.file.originalname,
+ });
+ res.status(400).json({ code: -1, message });
+ return;
+ }
const key = generateKey(type, req.file.originalname);
const result = await uploadFile(req.file.buffer, key, req.file.mimetype);