Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/components/CallView/CallView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
:fit-video="true"
:has-pagination="true"
:call-participant-models="callParticipantModels"
:screens="screens"
:target-aspect-ratio="gridTargetAspectRatio"
:local-media-model="localMediaModel"
:local-call-participant-model="localCallParticipantModel"
Expand Down
17 changes: 12 additions & 5 deletions src/components/CallView/Grid/Grid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
-->

<template>
<div class="grid-main-wrapper" :class="{'is-grid': !isStripe, 'transparent': isLessThanTwo}">
<div class="grid-main-wrapper" :class="{'is-grid': !isStripe, 'transparent': isLessThanTwoVideos}">
<button v-if="isStripe"
class="stripe--collapse"
:aria-label="stripeButtonTooltip"
Expand Down Expand Up @@ -56,8 +56,8 @@
:style="gridStyle"
@mousemove="handleMovement"
@keydown="handleMovement">
<template v-if="!devMode && (!isLessThanTwo || !isStripe)">
<EmptyCallView v-if="videos.length === 0 &&!isStripe" class="video" :is-grid="true" />
<template v-if="!devMode && (!isLessThanTwoVideos || !isStripe)">
<EmptyCallView v-if="videos.length === 0 && !isStripe" class="video" :is-grid="true" />
<template v-for="callParticipantModel in displayedVideos">
<Video
:key="callParticipantModel.attributes.peerId"
Expand Down Expand Up @@ -262,6 +262,10 @@ export default {
type: Boolean,
default: false,
},
screens: {
type: Array,
default: () => [],
},
},

data() {
Expand Down Expand Up @@ -326,8 +330,11 @@ export default {
return this.gridHeight / this.rows
},

isLessThanTwo() {
return this.callParticipantModels.length <= 1
isLessThanTwoVideos() {
// without screen share, we don't want to duplicate videos if we were to show them in the stripe
// however, if a screen share is in progress, it means the video of the presenting user is not visible
// so we can show it in the stripe
return this.callParticipantModels.length <= 1 && !this.screens.length
},

// The aspect ratio of the grid (in terms of px)
Expand Down