diff --git a/frontend/src/components/meeting/MeetingToolbar.vue b/frontend/src/components/meeting/MeetingToolbar.vue index 9337b97..03a6fe0 100644 --- a/frontend/src/components/meeting/MeetingToolbar.vue +++ b/frontend/src/components/meeting/MeetingToolbar.vue @@ -123,6 +123,11 @@ const emitIf = (name) => { background: rgba(17, 24, 39, 0.88); backdrop-filter: blur(16px); border-top: 1rpx solid rgba(255, 255, 255, 0.08); + /* flex-shrink:0 保证 body 内容高度过大时不会把 toolbar 挤出视口; + position:relative + z-index 提升按钮点击层级,避免 ChatPanel 遮挡 */ + flex-shrink: 0; + position: relative; + z-index: 15; } .btn { diff --git a/frontend/src/pages/meeting/preview.vue b/frontend/src/pages/meeting/preview.vue index a0dfd0d..f1b953e 100644 --- a/frontend/src/pages/meeting/preview.vue +++ b/frontend/src/pages/meeting/preview.vue @@ -197,8 +197,8 @@ const startPreview = async () => { const constraints = { audio: selectedAudioId.value ? { deviceId: { exact: selectedAudioId.value } } : true, video: selectedVideoId.value - ? { deviceId: { exact: selectedVideoId.value }, width: 640, height: 480 } - : { width: 640, height: 480 } + ? { deviceId: { exact: selectedVideoId.value }, width: { ideal: 1280 }, height: { ideal: 720 }, frameRate: { ideal: 24, max: 30 } } + : { width: { ideal: 1280 }, height: { ideal: 720 }, frameRate: { ideal: 24, max: 30 } } } previewStream = await navigator.mediaDevices.getUserMedia(constraints) hasPermission.value = true diff --git a/frontend/src/pages/meeting/room.vue b/frontend/src/pages/meeting/room.vue index b93e42f..bd5cf7d 100644 --- a/frontend/src/pages/meeting/room.vue +++ b/frontend/src/pages/meeting/room.vue @@ -379,6 +379,11 @@ const onCamToggle = async () => { const openInvite = () => { inviteVisible.value = true } const openMembers = () => { memberVisible.value = true } const openChat = () => { + // 点击工具栏聊天按钮时进行切换:已打开 → 关闭;未打开 → 打开并标记已读 + if (chatVisible.value) { + chatVisible.value = false + return + } chatVisible.value = true meetingStore.markChatsRead() } @@ -555,6 +560,7 @@ onUnload(() => { background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0)); position: relative; z-index: 5; + flex-shrink: 0; } .top-left { diff --git a/frontend/src/store/meeting.js b/frontend/src/store/meeting.js index 8399baf..00ec01f 100644 --- a/frontend/src/store/meeting.js +++ b/frontend/src/store/meeting.js @@ -648,9 +648,11 @@ export const useMeetingStore = defineStore('meeting', () => { const startLocalVideo = async (deviceId) => { if (!_engine) throw new Error('未连接') if (localProducers.video) return + // 与预览页保持一致的 HD 分辨率(ideal 1280x720,允许浏览器在设备不支持时降级) const videoConstraints = { - width: 640, - height: 480, + width: { ideal: 1280 }, + height: { ideal: 720 }, + frameRate: { ideal: 24, max: 30 }, ...(deviceId ? { deviceId: { exact: deviceId } } : {}) } const stream = await navigator.mediaDevices.getUserMedia({ video: videoConstraints })