Browse Source

fix(tile-view): thumbnail videos should cover entire thumbnail

Video elements may have problems scaling to cover pixel fractions,
so there could be a 1px black border line displaying in the
thumbnail. It's most visible in tile view. Flooring the sizing
calculations hides the border.
master
Leonard Kim 7 years ago
parent
commit
a1ef845663
1 changed files with 4 additions and 3 deletions
  1. 4
    3
      modules/UI/videolayout/Filmstrip.js

+ 4
- 3
modules/UI/videolayout/Filmstrip.js View File

@@ -301,10 +301,11 @@ const Filmstrip = {
301 301
         const initialWidth = viewWidth / columns;
302 302
         const aspectRatioHeight = initialWidth / tileAspectRatio;
303 303
 
304
-        const heightOfEach = Math.min(
304
+        const heightOfEach = Math.floor(Math.min(
305 305
             aspectRatioHeight,
306
-            viewHeight / visibleRows);
307
-        const widthOfEach = tileAspectRatio * heightOfEach;
306
+            viewHeight / visibleRows
307
+        ));
308
+        const widthOfEach = Math.floor(tileAspectRatio * heightOfEach);
308 309
 
309 310
         return {
310 311
             localVideo: {

Loading…
Cancel
Save