Browse Source

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.
j8
Leonard Kim 5 years ago
parent
commit
70f14be50f
2 changed files with 2 additions and 5 deletions
  1. 2
    0
      css/_videolayout_default.scss
  2. 0
    5
      modules/UI/videolayout/VideoContainer.js

+ 2
- 0
css/_videolayout_default.scss View File

@@ -489,6 +489,8 @@
489 489
     height: 300px;
490 490
     margin: auto;
491 491
     position: relative;
492
+    top: 50%;
493
+    transform: translateY(-50%);
492 494
 }
493 495
 
494 496
 #mixedstream {

+ 0
- 5
modules/UI/videolayout/VideoContainer.js View File

@@ -454,11 +454,6 @@ export class VideoContainer extends LargeContainer {
454 454
         const { horizontalIndent, verticalIndent }
455 455
             = this.getVideoPosition(width, height, containerWidth, containerHeight);
456 456
 
457
-        // update avatar position
458
-        const top = (containerHeight / 2) - (this.avatarHeight / 4 * 3);
459
-
460
-        this.$avatar.css('top', top);
461
-
462 457
         this.$wrapper.animate({
463 458
             width,
464 459
             height,

Loading…
Cancel
Save