From f5bc7885392e0648114fa7cfe3477b957a2f6dae Mon Sep 17 00:00:00 2001 From: zhangzheng Date: Thu, 12 Mar 2026 15:48:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B3=E9=97=AD=E8=A7=86=E9=A2=91=E7=94=BB?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebApp/client/public/onebyone/renderer.js | 34 +++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/WebApp/client/public/onebyone/renderer.js b/WebApp/client/public/onebyone/renderer.js index f7244cc..13f571f 100644 --- a/WebApp/client/public/onebyone/renderer.js +++ b/WebApp/client/public/onebyone/renderer.js @@ -203,6 +203,40 @@ class UIRenderer { this.elements.remoteStatus.textContent = this.getStatusText(remoteUser.status); } + // 当远程视频关闭时显示占位符 + if (this.elements.remoteVideoPlaceholder) { + const shouldShowPlaceholder = !remoteUser.mediaState.video; + toggleElement(this.elements.remoteVideoPlaceholder, shouldShowPlaceholder); + + // 更新占位符文本内容 + if (shouldShowPlaceholder) { + const placeholderContent = this.elements.remoteVideoPlaceholder.querySelector('.text-center'); + if (placeholderContent) { + const titleElement = placeholderContent.querySelector('p.text-white.text-lg.font-medium'); + if (titleElement) { + titleElement.textContent = '对方摄像头已关闭'; + } + const subtitleElement = placeholderContent.querySelector('p.text-sm.text-gray-400'); + if (subtitleElement) { + subtitleElement.textContent = '对方暂时关闭了视频'; + } + } + } else { + // 恢复默认占位符文本 + const placeholderContent = this.elements.remoteVideoPlaceholder.querySelector('.text-center'); + if (placeholderContent) { + const titleElement = placeholderContent.querySelector('p.text-white.text-lg.font-medium'); + if (titleElement) { + titleElement.textContent = '等待对方连接...'; + } + const subtitleElement = placeholderContent.querySelector('p.text-sm.text-gray-400'); + if (subtitleElement) { + subtitleElement.textContent = '请确保对方已加入通话'; + } + } + } + } + // 渲染说话状态 if (this.elements.remoteSpeakingIndicator) { toggleElement(this.elements.remoteSpeakingIndicator, remoteUser.mediaState.isSpeaking);