浏览代码

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 年前
父节点
当前提交
70f14be50f
共有 2 个文件被更改,包括 2 次插入5 次删除
  1. 2
    0
      css/_videolayout_default.scss
  2. 0
    5
      modules/UI/videolayout/VideoContainer.js

+ 2
- 0
css/_videolayout_default.scss 查看文件

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

+ 0
- 5
modules/UI/videolayout/VideoContainer.js 查看文件

454
         const { horizontalIndent, verticalIndent }
454
         const { horizontalIndent, verticalIndent }
455
             = this.getVideoPosition(width, height, containerWidth, containerHeight);
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
         this.$wrapper.animate({
457
         this.$wrapper.animate({
463
             width,
458
             width,
464
             height,
459
             height,

正在加载...
取消
保存