视频没有占位符修复

This commit is contained in:
2026-05-16 20:11:36 +08:00
parent 53166b648f
commit d7264b9102
3 changed files with 21 additions and 11 deletions

View File

@@ -290,6 +290,15 @@ class UIRenderer {
const shouldShowPlaceholder = !remoteUser.mediaState.video;
toggleElement(this.elements.remoteVideoPlaceholder, shouldShowPlaceholder);
// 当远程视频关闭时,隐藏视频元素本身,避免冻结画面透过占位符
if (this.elements.remoteVideo) {
if (shouldShowPlaceholder) {
this.elements.remoteVideo.style.opacity = '0';
} else {
this.elements.remoteVideo.style.opacity = '1';
}
}
// 更新占位符文本内容
if (shouldShowPlaceholder) {
const placeholderContent = this.elements.remoteVideoPlaceholder.querySelector('.text-center');