头像显示时机
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 2m48s

This commit is contained in:
Song367 2025-08-06 18:40:49 +08:00
parent 5c9e170c73
commit 5f1e50c7e9

View File

@ -985,18 +985,23 @@ class WebRTCChat {
this.stopButton.style.display = 'none'; this.stopButton.style.display = 'none';
this.stopButton.disabled = true; this.stopButton.disabled = true;
// 显示头像,隐藏视频
if (this.videoContainer) {
this.videoContainer.classList.remove('calling');
}
// 延迟刷新,确保服务器处理完断开逻辑 // 延迟刷新,确保服务器处理完断开逻辑
console.log('通话已结束5秒后刷新页面清除缓存...'); console.log('通话已结束5秒后刷新页面清除缓存...');
setTimeout(() => { setTimeout(() => {
window.location.reload(); window.location.reload();
this.startButton.style.display = 'block'; this.startButton.style.display = 'block';
this.startButton.disabled = false; this.startButton.disabled = false;
}, 300); }, 300);
setTimeout(() => {
// 显示头像,隐藏视频
if (this.videoContainer) {
this.videoContainer.classList.remove('calling');
}
}, 300);
} }
// 清除视频缓存的方法 // 清除视频缓存的方法