From db7ea0b44af8764cf2d171351dd237df168cb304 Mon Sep 17 00:00:00 2001 From: duoaohui <928970622@qq.com> Date: Wed, 27 May 2026 14:38:55 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=86=E9=A2=91=E8=BF=9E=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/meeting/MeetingToolbar.vue | 25 +++++++++-- frontend/src/components/meeting/VideoTile.vue | 9 ++-- frontend/src/pages/meeting/room.vue | 42 +++++++++++++++++++ frontend/src/store/meeting.js | 26 +++++++++++- frontend/src/utils/mediasoup-client.js | 22 ++++++++++ .../src/services/transport.service.ts | 13 +++++- 6 files changed, 128 insertions(+), 9 deletions(-) diff --git a/frontend/src/components/meeting/MeetingToolbar.vue b/frontend/src/components/meeting/MeetingToolbar.vue index b3996b1..7a86f97 100644 --- a/frontend/src/components/meeting/MeetingToolbar.vue +++ b/frontend/src/components/meeting/MeetingToolbar.vue @@ -284,9 +284,26 @@ const emitIf = (name) => { } .badge.badge-red { background: #EF4444; } -@media (max-width: 420px) { - .btn { min-width: 88rpx; } - .icon { width: 64rpx; height: 64rpx; } - .label { font-size: 20rpx; } +@media (max-width: 750px) { + .toolbar { + position: fixed; + left: 0; + right: 0; + bottom: 0; + justify-content: flex-start; + gap: 8rpx; + padding: 10rpx 12rpx calc(10rpx + env(safe-area-inset-bottom)) 12rpx; + overflow-x: auto; + overflow-y: hidden; + -webkit-overflow-scrolling: touch; + } + .btn { + min-width: 76rpx; + flex: 0 0 auto; + gap: 4rpx; + padding: 4rpx 4rpx; + } + .icon { width: 54rpx; height: 54rpx; } + .label { font-size: 18rpx; } } diff --git a/frontend/src/components/meeting/VideoTile.vue b/frontend/src/components/meeting/VideoTile.vue index a860e3c..42717af 100644 --- a/frontend/src/components/meeting/VideoTile.vue +++ b/frontend/src/components/meeting/VideoTile.vue @@ -49,12 +49,14 @@ const props = defineProps({ audioTrack: { type: Object, default: null }, videoTrack: { type: Object, default: null }, isSpeaking: { type: Boolean, default: false }, - compact: { type: Boolean, default: false } + compact: { type: Boolean, default: false }, + videoFit: { type: String, default: 'cover' } }) const mediaBox = ref(null) const hasVideo = computed(() => !!props.videoTrack && props.videoEnabled) +const normalizedVideoFit = computed(() => props.videoFit === 'contain' ? 'contain' : 'cover') const avatarInitial = computed(() => { const s = (props.name || '').trim() @@ -82,7 +84,7 @@ const ensureMediaEl = (tagName) => { if (tagName === 'video') { el.style.width = '100%' el.style.height = '100%' - el.style.objectFit = 'cover' + el.style.objectFit = normalizedVideoFit.value el.style.background = '#0B1220' el.style.display = 'block' } @@ -134,6 +136,7 @@ const applyVideo = (retry = 0) => { } const el = ensureMediaEl('video') if (!el) return + el.style.objectFit = normalizedVideoFit.value // 关键: