优化目录结构

This commit is contained in:
2026-05-25 20:37:36 +08:00
parent bbe7e71274
commit 40fd7f7e08
101 changed files with 108 additions and 110 deletions

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

Before

Width:  |  Height:  |  Size: 472 KiB

After

Width:  |  Height:  |  Size: 472 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 166 KiB

After

Width:  |  Height:  |  Size: 166 KiB

View File

Before

Width:  |  Height:  |  Size: 152 KiB

After

Width:  |  Height:  |  Size: 152 KiB

View File

Before

Width:  |  Height:  |  Size: 274 KiB

After

Width:  |  Height:  |  Size: 274 KiB

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -1,13 +1,13 @@
import { createLogger } from './logger.js';
import { createLogger } from '../../shared/logger.js';
const logger = createLogger('chat');
/**
* 消息模块
* 处理聊天消息的发送接收和显示
*/
import { showNotification, generateId } from './utils.js';
import store from './store.js';
import { mockMessages } from './models.js';
import { showNotification, generateId } from '../../shared/utils.js';
import store from '../store.js';
import { mockMessages } from '../models.js';
const MAX_IMAGE_SIZE = 5 * 1024 * 1024; // 5MB

View File

@@ -1,13 +1,13 @@
import { showNotification } from './utils.js';
import { showNotification } from '../shared/utils.js';
import store from './store.js';
import {
fetchConnectionDirectory,
fetchOnlineUsers,
renderConnectionIds,
renderOnlineUsers
} from './connect-directory.js';
import { createProfileSettingsController } from './profile-settings.js';
import { createLogger } from './logger.js';
} from './signaling/connect-directory.js';
import { createProfileSettingsController } from './controllers/profile-settings.js';
import { createLogger } from '../shared/logger.js';
const logger = createLogger('connectview');

View File

@@ -1,4 +1,4 @@
import { createLogger } from './logger.js';
import { createLogger } from '../../shared/logger.js';
const logger = createLogger('invite');
const DEFAULT_CALLER_NAME = '\u9080\u8bf7\u65b9';

View File

@@ -1,4 +1,4 @@
import { createLogger } from './logger.js';
import { createLogger } from '../../shared/logger.js';
const logger = createLogger('profile');
const DEFAULT_AVATAR = '/images/p1.png';

View File

@@ -7,7 +7,7 @@
<title>VideoCall - 一对一视频通话</title>
<script src="https://cdn.tailwindcss.com"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="/styles/style.css">
</head>
<body class="h-screen w-screen flex flex-col text-white bg-grid relative">
@@ -726,8 +726,8 @@
</div>
<!-- 引入模块化JavaScript文件 -->
<script type="module" src="connectview.js"></script>
<script type="module" src="main.js"></script>
<script type="module" src="/call/connectview.js"></script>
<script type="module" src="/call/main.js"></script>
</body>

View File

@@ -1,15 +1,15 @@
import store from './store.js';
import UIRenderer from './renderer.js';
import { showNotification, randomMeetingId } from './utils.js';
import chatMessage from './chatmessage.js';
import { createCallViewController } from './call-view-controller.js';
import UIRenderer from './renderers/renderer.js';
import { showNotification, randomMeetingId } from '../shared/utils.js';
import chatMessage from './chat/chatmessage.js';
import { createCallViewController } from './controllers/call-view-controller.js';
import {
bindConnectViewEvents,
initWebSocket,
loadUserSettings
} from './connectview.js';
import { createInviteController } from './invite-controller.js';
import { createLogger } from './logger.js';
import { createInviteController } from './controllers/invite-controller.js';
import { createLogger } from '../shared/logger.js';
const logger = createLogger('main');

View File

@@ -1,5 +1,5 @@
import { createParticipantTile, getParticipantTile } from './renderer-participant-grid.js';
import { createLogger } from './logger.js';
import { createParticipantTile, getParticipantTile } from '../participants/renderer-participant-grid.js';
import { createLogger } from '../../shared/logger.js';
const logger = createLogger('renderer-media');

View File

@@ -1,7 +1,7 @@
import { formatTime, formatTimestamp, toggleElement, toggleButtonState } from './utils.js';
import { mockCallSession } from './models.js';
import chatMessage from './chatmessage.js';
import store from './store.js';
import { formatTime, formatTimestamp, toggleElement, toggleButtonState } from '../../shared/utils.js';
import { mockCallSession } from '../models.js';
import chatMessage from '../chat/chatmessage.js';
import store from '../store.js';
import {
buildUserCountLabel,
createUserEntryElement,
@@ -10,11 +10,11 @@ import {
getNetworkQualityDisplay,
getRemoteVideoPlaceholderText
} from './renderer-ui.js';
import { renderChatMessagesInto } from './renderer-chat.js';
import { renderChatMessagesInto } from '../chat/renderer-chat.js';
import {
updateParticipantTileName as syncParticipantTileName,
updateParticipantTilePlaceholder
} from './renderer-participant-grid.js';
} from '../participants/renderer-participant-grid.js';
import {
adjustVideoSize,
clearParticipantGrid,
@@ -22,8 +22,8 @@ import {
removeParticipantTile,
renderParticipantStreamMedia,
renderSingleRemoteStreamMedia
} from './renderer-media.js';
import { createLogger } from './logger.js';
} from '../media/renderer-media.js';
import { createLogger } from '../../shared/logger.js';
const logger = createLogger('renderer');
@@ -513,7 +513,7 @@ class UIRenderer {
renderCallEnded() {
logger.debug('Call ended');
clearParticipantGrid(this.elements.participantGrid);
window.location.href = './endcall/endcall.html';
window.location.href = '/endcall/';
}
renderParticipantLeft(connectionId) {

View File

@@ -1,5 +1,5 @@
import { Signaling, WebSocketSignaling } from "../../module/signaling.js";
import { createLogger } from './logger.js';
import { Signaling, WebSocketSignaling } from '/module/core/signaling.js';
import { createLogger } from '../../shared/logger.js';
const logger = createLogger('signaling');

View File

@@ -1,15 +1,15 @@
import { mockCallSession } from './models.js';
import { RenderStreaming } from "../../module/renderstreaming.js";
import { getServerConfig, getRTCConfiguration } from "../js/config.js";
import { showNotification, generateId } from './utils.js';
import chatMessage from './chatmessage.js';
import { DEFAULT_PARTICIPANT_AVATAR, DEFAULT_PARTICIPANT_NAME, buildParticipantsSyncData, omitParticipant, removeParticipant, upsertParticipant } from './participants.js';
import { AUDIO_CONFIG, VAD_CONFIG, VIDEO_ONLY_CONSTRAINT, buildVideoConstraints, getAdaptiveVideoBitrate, getResolutionLabel, getTargetResolutionBitrate } from './media-config.js';
import { buildStatsLogPayload, createAudioAnalyser, getAudioLevel } from './media-monitoring.js';
import { bindInviteSocketEvents, buildSocketUserInfoPayload, createSignalingInstance, ensureSignalingStarted, getActiveSignalingInstance, sendInviteSignal, sendSocketUserInfo } from './signaling-session.js';
import { getNetworkQualityFromSummary, summarizeInboundStats } from './webrtc-stats.js';
import { createLogger } from './logger.js';
import { MeetingRecorder } from './meeting-recorder.js';
import { RenderStreaming } from '/module/core/renderstreaming.js';
import { getServerConfig, getRTCConfiguration } from '../render-streaming/config.js';
import { showNotification, generateId } from '../shared/utils.js';
import chatMessage from './chat/chatmessage.js';
import { DEFAULT_PARTICIPANT_AVATAR, DEFAULT_PARTICIPANT_NAME, buildParticipantsSyncData, omitParticipant, removeParticipant, upsertParticipant } from './participants/participants.js';
import { AUDIO_CONFIG, VAD_CONFIG, VIDEO_ONLY_CONSTRAINT, buildVideoConstraints, getAdaptiveVideoBitrate, getResolutionLabel, getTargetResolutionBitrate } from './media/media-config.js';
import { buildStatsLogPayload, createAudioAnalyser, getAudioLevel } from './media/media-monitoring.js';
import { bindInviteSocketEvents, buildSocketUserInfoPayload, createSignalingInstance, ensureSignalingStarted, getActiveSignalingInstance, sendInviteSignal, sendSocketUserInfo } from './signaling/signaling-session.js';
import { getNetworkQualityFromSummary, summarizeInboundStats } from './media/webrtc-stats.js';
import { createLogger } from '../shared/logger.js';
import { MeetingRecorder } from './media/meeting-recorder.js';
const logger = createLogger('store');
class CallStateManager {

View File

@@ -1,4 +1,4 @@
import { createLogger } from '../logger.js';
import { createLogger } from '../shared/logger.js';
const logger = createLogger('legacy-connect');
/**
@@ -6,7 +6,7 @@ const logger = createLogger('legacy-connect');
* 处理初始连接、创建通话和加入通话的功能
*/
import { showNotification, randomMeetingId } from '../utils.js';
import { showNotification, randomMeetingId } from '../shared/utils.js';
const MAX_AVATAR_SIZE = 2 * 1024 * 1024; // 2MB
@@ -20,7 +20,7 @@ function joinCall() {
localStorage.setItem('connectionId', connectionId);
// 跳转到通话界面
window.location.href = '../index.html';
window.location.href = '/';
} else {
showNotification('请输入连接ID', 'error');
}
@@ -39,7 +39,7 @@ function createCall() {
localStorage.setItem('connectionId', connectionId);
// 跳转到通话界面
window.location.href = '../index.html';
window.location.href = '/';
}

View File

@@ -6,7 +6,7 @@
<title>VideoCall - 重定向</title>
<script>
// 重定向到SPA入口页面index.html
window.location.href = '../index.html';
window.location.href = '/';
</script>
</head>
<body>

View File

@@ -3,14 +3,14 @@
* 处理通话结束后的操作,如重新连接或返回连接界面
*/
import { showNotification } from '../utils.js';
import { showNotification } from '../shared/utils.js';
// 重新连接
function reconnectCall() {
showNotification('正在重新连接...');
// 跳转到通话界面
window.location.href = '../index.html';
window.location.href = '/';
}
// 离开
@@ -19,7 +19,7 @@ function leaveCall() {
localStorage.removeItem('connectionId');
// 跳转到连接界面
window.location.href = '../connect/connect.html';
window.location.href = '/connect/';
}
// 绑定事件监听器

View File

@@ -6,7 +6,7 @@
<title>VideoCall - 通话结束</title>
<script src="https://cdn.tailwindcss.com"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
<link rel="stylesheet" href="../css/style.css">
<link rel="stylesheet" href="/styles/style.css">
</head>
<body class="h-screen w-screen flex flex-col text-white bg-grid relative">
<!--

View File

@@ -7,7 +7,7 @@
<title>VideoCall - 录制管理</title>
<script src="https://cdn.tailwindcss.com"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
<link rel="stylesheet" href="/css/style.css">
<link rel="stylesheet" href="/styles/style.css">
</head>
<body class="min-h-screen w-screen text-white bg-grid recordings-page">

View File

@@ -1,5 +1,5 @@
import { Observer, Sender } from "../module/sender.js";
import { InputRemoting } from "../module/inputremoting.js";
import { Observer, Sender } from "/module/core/sender.js";
import { InputRemoting } from "/module/input/inputremoting.js";
export class VideoPlayer {
constructor() {
@@ -210,4 +210,4 @@ export class VideoPlayer {
await new Promise(resolve => setTimeout(resolve, 100));
this.inputRemoting.startSending();
}
}
}