Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable20.1] Enable pagination for main grid view #4991

Merged
Next Next commit
Include local video when grid is in development mode
This ensures that the grid view in development mode will behave like the
grid view in normal mode.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
danxuliu committed Jan 21, 2021
commit 14b4630ff7905e41057649f20afa0331d5cb07b8
28 changes: 14 additions & 14 deletions src/components/CallView/Grid/Grid.vue
Original file line number Diff line number Diff line change
@@ -54,17 +54,6 @@
:shared-data="sharedDatas[callParticipantModel.attributes.peerId]"
@click-video="handleClickVideo($event, callParticipantModel.attributes.peerId)" />
</template>
<LocalVideo
v-if="!isStripe"
ref="localVideo"
class="video"
:is-grid="true"
:fit-video="isStripe"
:local-media-model="localMediaModel"
:video-container-aspect-ratio="videoContainerAspectRatio"
:local-call-participant-model="localCallParticipantModel"
@switchScreenToId="1"
@click-video="handleClickLocalVideo" />
</template>
<!-- Grid developer mode -->
<template v-else>
@@ -76,6 +65,17 @@
<h1 class="dev-mode__title">
Dev mode on ;-)
</h1>
<LocalVideo
v-if="!isStripe"
ref="localVideo"
class="video"
:is-grid="true"
:fit-video="isStripe"
:local-media-model="localMediaModel"
:video-container-aspect-ratio="videoContainerAspectRatio"
:local-call-participant-model="localCallParticipantModel"
@switchScreenToId="1"
@click-video="handleClickLocalVideo" />
</template>
</div>
<button v-if="hasNextPage && gridWidth > 0 && isStripe && showVideoOverlay"
@@ -257,9 +257,9 @@ export default {
}
},

// Number of video components (includes localvideo if not in dev mode)
// Number of video components (includes localvideo if not stripe)
videosCount() {
if (this.devMode || this.isStripe) {
if (this.isStripe) {
return this.videos.length
} else {
// Count the emptycontent as a grid element
@@ -492,7 +492,7 @@ export default {
this.shrinkGrid(this.videosCount)
}
// Once the grid is done, populate it with video components
if (this.devMode || this.isStripe) {
if (this.isStripe) {
this.displayedVideos = this.videos.slice(0, this.rows * this.columns)
} else {
// `- 1` because we a ccount for the localVideo component (see template)