Browse Source

Fix grid when the number of videos is below the limit

When "videosCap" is set it was always applied, no matter the actual
number of videos. Due to this, even if there was just a single remote
video, as the available size was calculated based on the limit rather
than on the actual number of videos a mostly empty grid was shown.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
pull/6439/head
Daniel Calviño Sánchez 4 years ago
parent
commit
9731a2345e
  1. 2
      src/components/CallView/Grid/Grid.vue

2
src/components/CallView/Grid/Grid.vue

@ -650,7 +650,7 @@ export default {
// video components would occupy only the first 2 slots and be too small.
// To solve this, we shrink this 'max grid' we've just created to fit the
// number of videos that we have.
if (this.videosCap !== 0) {
if (this.videosCap !== 0 && this.videosCount > this.videosCap) {
this.shrinkGrid(this.videosCap)
} else {
this.shrinkGrid(this.videosCount)

Loading…
Cancel
Save