Page MenuHomekolab.org

[Meet] Fix video elements sizing bug
ClosedPublic

Authored by machniak on Apr 14 2021, 2:29 PM.

Details

Reviewers
mollekopf
Group Reviewers
Restricted Project
Commits
rK7e6b1576f5cf: [Meet] Fix video elements sizing bug
Summary

T432152

Test Plan

./phpunit

Diff Detail

Repository
rK kolab
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

machniak requested review of this revision.Apr 14 2021, 2:29 PM
machniak created this revision.

Could it be that the problem is not the precision but that offsetWidth does not take any transformations into account? See https://developer.mozilla.org/en-US/docs/Web/API/CSS_Object_Model/Determining_the_dimensions_of_elements

Would in any case only affect the comment, so feel free to ship this.

I couldn't find any references to any rounding going on. Given that the values are all in pixels (right?) I would be interested to what these values are rounded to (for my understanding, you can ship it if it works).

The main cause for the issue is the chat element that uses width: 30%, which causes the screen to be split not evenly (sometimes with 0.5px difference). offsetWidth is always rounded up to full pixels. So, when you divide that (0.5px bigger than in reality) width by the number of columns the sum of widthts of the participant boxes will be bigger than the real width of the container.

mollekopf accepted this revision.Apr 15 2021, 10:39 AM
This revision is now accepted and ready to land.Apr 15 2021, 10:39 AM
This revision was automatically updated to reflect the committed changes.