From 85a92ac0d3b69d6254f871c01c1177473dd3d85a Mon Sep 17 00:00:00 2001 From: songjvcheng Date: Wed, 6 Aug 2025 18:46:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=98=BE=E7=A4=BA=E5=A4=B4?= =?UTF-8?q?=E5=83=8F=E6=97=B6=E6=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/index.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/index.js b/src/index.js index 7d6af39..b8c39d9 100644 --- a/src/index.js +++ b/src/index.js @@ -948,10 +948,10 @@ class WebRTCChat { this.stopButton.style.display = 'none'; this.stopButton.disabled = true; - // 显示头像,隐藏视频 - if (this.videoContainer) { - this.videoContainer.classList.remove('calling'); - } + // // 显示头像,隐藏视频 + // if (this.videoContainer) { + // this.videoContainer.classList.remove('calling'); + // } // 延迟刷新,确保服务器处理完断开逻辑 console.log('通话已结束,5秒后刷新页面清除缓存...'); @@ -960,6 +960,13 @@ class WebRTCChat { this.startButton.style.display = 'block'; this.startButton.disabled = false; }, 2000); + + setTimeout(() => { + // 显示头像,隐藏视频 + if (this.videoContainer) { + this.videoContainer.classList.remove('calling'); + } + }, 300); } // 清除视频缓存的方法