Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix grid view
Add 100% height only when in grid view.
Added LocalMediaControls to LocalVideo for when in grid view, properly
centered.

Signed-off-by: Vincent Petry <[email protected]>
  • Loading branch information
PVince81 committed Oct 19, 2020
commit b9437dd3dfad411d9e19e8ed0d6311cee305d832
9 changes: 6 additions & 3 deletions src/components/CallView/CallView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<EmptyCallView v-if="!remoteParticipantsCount && !screenSharingActive && !isGrid" />
<div id="videos">
<LocalMediaControls
v-if="!isGrid"
class="local-media-controls"
:model="localMediaModel"
:local-call-participant-model="localCallParticipantModel"
Expand Down Expand Up @@ -115,6 +116,7 @@
ref="localVideo"
class="local-video"
:class="{ 'local-video--sidebar': isSidebar }"
:show-controls="false"
:fit-video="true"
:is-stripe="true"
:local-media-model="localMediaModel"
Expand Down Expand Up @@ -224,10 +226,10 @@ export default {
},

gridTargetAspectRatio() {
if (this.isStripe) {
return 1
} else {
if (this.isGrid) {
return 1.5
} else {
return 1
}
},

Expand Down Expand Up @@ -721,4 +723,5 @@ export default {
bottom: 4px;
z-index: 10;
}

</style>
6 changes: 5 additions & 1 deletion 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">
<div :class="{'grid-main-wrapper': true, 'is-grid': !isStripe}">
<button v-if="isStripe"
class="stripe--collapse"
@click="stripeOpen = !stripeOpen">
Expand Down Expand Up @@ -691,6 +691,10 @@ export default {
background-color: var(--color-text-maxcontrast);
}

.grid-main-wrapper.is-grid {
height: 100%;
}

.wrapper {
width: 100%;
display: flex;
Expand Down
24 changes: 24 additions & 0 deletions src/components/CallView/shared/LocalVideo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@
{{ firstLetterOfGuestName }}
</div>
</div>
<transition name="fade">
<LocalMediaControls
v-if="showControls"
class="local-media-controls"
:model="localMediaModel"
:local-call-participant-model="localCallParticipantModel"
:screen-sharing-button-hidden="isSidebar"
@switch-screen-to-id="$emit('switchScreenToId', $event)" />
</transition>
<div v-if="mouseover && isSelectable" class="hover-shadow" />
<div class="bottom-bar">
<button
Expand All @@ -63,6 +72,7 @@
<script>
import attachMediaStream from 'attachmediastream'
import Avatar from '@nextcloud/vue/dist/Components/Avatar'
import LocalMediaControls from './LocalMediaControls'
import Hex from 'crypto-js/enc-hex'
import SHA1 from 'crypto-js/sha1'
import {
Expand All @@ -79,6 +89,7 @@ export default {

components: {
Avatar,
LocalMediaControls,
VideoBackground,
},

Expand All @@ -105,6 +116,10 @@ export default {
type: Boolean,
default: false,
},
showControls: {
type: Boolean,
default: true,
},
},

computed: {
Expand Down Expand Up @@ -330,4 +345,13 @@ export default {
}
}

.local-media-controls {
position: absolute;
text-align: center;
right: 0;
bottom: 4px;
z-index: 10;
width: 100%;
}

</style>