视频没有占位符修复
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user