完成视频渲染
This commit is contained in:
@@ -159,8 +159,12 @@ class UIRenderer {
|
||||
this.renderRemoteVideo(state.session.remoteUser); // 渲染远程视频
|
||||
this.renderUserList(state.session.localUser, state.session.remoteUser, state.participants); // 渲染用户列表
|
||||
// Host端:精准更新发送者participant tile的占位背景
|
||||
if (changes.participantId) {
|
||||
this.renderParticipantVideoPlaceholder(changes.participantId, !state.session.remoteUser.mediaState.video);
|
||||
// 只有Host端需要处理participantId对应的tile占位符(Participant端没有其他Participant的视频流)
|
||||
if (changes.participantId && state.session.localUser.isHost) {
|
||||
// 从participants Map中读取该participant的video状态,而非remoteUser(多Participant场景remoteUser不精确)
|
||||
const pInfo = state.participants[changes.participantId];
|
||||
const showPlaceholder = pInfo ? !pInfo.mediaState.video : true;
|
||||
this.renderParticipantVideoPlaceholder(changes.participantId, showPlaceholder);
|
||||
}
|
||||
break;
|
||||
case 'USER_LIST_UPDATE':
|
||||
|
||||
Reference in New Issue
Block a user