From 70f14be50f150ff3368a27f6202de3f1e2a8a0a7 Mon Sep 17 00:00:00 2001 From: Leonard Kim Date: Fri, 15 Nov 2019 06:55:21 -0800 Subject: [PATCH] fix(large-video): center dominant speaker avatar using css The vertical alignment was being set with javascript. Recent changes might make the setting of alignment exit early due to height 0 video. As position can be set declaratively with css, use css to set position. --- css/_videolayout_default.scss | 2 ++ modules/UI/videolayout/VideoContainer.js | 5 ----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/css/_videolayout_default.scss b/css/_videolayout_default.scss index 34007992b..c9676fd89 100644 --- a/css/_videolayout_default.scss +++ b/css/_videolayout_default.scss @@ -489,6 +489,8 @@ height: 300px; margin: auto; position: relative; + top: 50%; + transform: translateY(-50%); } #mixedstream { diff --git a/modules/UI/videolayout/VideoContainer.js b/modules/UI/videolayout/VideoContainer.js index dd4c3ce14..808defe26 100644 --- a/modules/UI/videolayout/VideoContainer.js +++ b/modules/UI/videolayout/VideoContainer.js @@ -454,11 +454,6 @@ export class VideoContainer extends LargeContainer { const { horizontalIndent, verticalIndent } = this.getVideoPosition(width, height, containerWidth, containerHeight); - // update avatar position - const top = (containerHeight / 2) - (this.avatarHeight / 4 * 3); - - this.$avatar.css('top', top); - this.$wrapper.animate({ width, height,