diff --git a/src/views/meeting/meeting-room/meeting-room-student.vue b/src/views/meeting/meeting-room/meeting-room-student.vue index 719f67d..8350434 100644 --- a/src/views/meeting/meeting-room/meeting-room-student.vue +++ b/src/views/meeting/meeting-room/meeting-room-student.vue @@ -361,6 +361,21 @@ } } + const ensureLocalVideoPlaying = async () => { + await nextTick(); + const el = document.getElementById('player-local'); + if (!el) { + return; + } + if (el.querySelector('video')) { + return; + } + const track = meeting.localUser.videoTrack; + if (track) { + track.play(el); + } + }; + watch( () => primaryUid.value, (uid) => { @@ -372,6 +387,18 @@ { immediate: true } ); + watch( + () => selfWindowUid.value, + (uid) => { + if (!uid) { + ensureLocalVideoPlaying(); + } else { + ensurePrimaryVideoPlaying(uid); + } + }, + { immediate: true } + ); + watch( () => meeting.remoteUsers.value.length, () => { @@ -755,7 +782,8 @@ align-items: center; justify-content: center; width: 100%; - padding: 16px; + padding: 15px; + padding-top: 0; overflow: hidden; } @@ -834,56 +862,74 @@ } .control-bar { + position: absolute; + bottom: 13px; + left: 50%; + z-index: 10; display: flex; - gap: 14px; + gap: 20px; + align-items: center; justify-content: center; - width: 100%; - padding: 14px 16px 18px; + padding: 16px; + background: rgba(255, 255, 255, 0.5); + border-radius: 12px; + transform: translateX(-50%); } .control-btn { - display: inline-flex; - gap: 10px; + display: flex; + flex-direction: column; + gap: 2px; align-items: center; - justify-content: center; padding: 10px 16px; - color: #ffffff; + color: var(--el-color-primary); cursor: pointer; - background: rgba(0, 0, 0, 0.65); - border: 1px solid rgba(255, 255, 255, 0.15); - border-radius: 14px; - transition: all 0.2s ease; + background: rgba(255, 255, 255, 0.1); + border: 1px solid var(--el-color-primary-light-7); + border-radius: 12px; + transition: all 0.3s ease; - &:hover { - background: rgba(0, 0, 0, 0.78); + svg { + width: 24px; + height: 24px; + } + + .btn-text { + font-size: 13px; + color: var(--el-color-primary); } &:disabled { cursor: not-allowed; opacity: 0.6; + transform: none !important; + } + + &:not(:disabled):hover { + background: rgba(255, 255, 255, 0.2); + transform: translateY(-2px); } &.active { - background: rgba(102, 126, 234, 0.85); - border-color: rgba(102, 126, 234, 0.55); + color: var(--el-color-primary); + background: var(--el-color-primary-light-9); } &.danger { - background: rgba(239, 68, 68, 0.85); - border-color: rgba(239, 68, 68, 0.55); + color: var(--el-color-danger); + background: var(--el-color-danger-light-9); + border: 1px solid var(--el-color-danger-light-7); + + .btn-text { + color: var(--el-color-danger); + } + + &:hover { + background: var(--el-color-danger-light-7); + } } } - .btn-text { - font-size: 13px; - font-weight: 600; - } - - .control-btn :deep(svg) { - width: 18px; - height: 18px; - } - .player-wrapper :deep(video) { width: 100%; height: 100%;