Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(vertical-filmstrip): prevent shared videos from displaying under avatars

Leonard Kima653816f90a5
diff --git a/css/_toolbars.scss b/css/_toolbars.scss
index 91b22b955c..436ed9c668 100644
--- a/css/_toolbars.scss
+++ b/css/_toolbars.scss
@@ -186,6 +186,7 @@
justify-content: flex-start;
left: 0;
padding-top: 24px;
+ pointer-events: none;
top: 0;
transform: translateX(-100%);
width: $defaultToolbarSize;
@@ -197,6 +198,10 @@
line-height: $secToolbarLineHeight;
}
+ > * {
+ pointer-events: auto
+ }
+
.button.toggled:not(.icon-raised-hand):not(.button-active) {
background: $secondaryToolbarBg;
cursor: pointer;
diff --git a/css/_vertical_filmstrip_overrides.scss b/css/_vertical_filmstrip_overrides.scss
index 6778a14c7a..978dd854c6 100644
--- a/css/_vertical_filmstrip_overrides.scss
+++ b/css/_vertical_filmstrip_overrides.scss
@@ -14,6 +14,11 @@
min-width: 0;
}
+ #etherpad,
+ #sharedvideo {
+ text-align: left;
+ }
+
.filmstrip {
align-items: flex-end;
box-sizing: border-box;
diff --git a/modules/UI/etherpad/Etherpad.js b/modules/UI/etherpad/Etherpad.js
index ddc95b064d..77a77f596d 100644
--- a/modules/UI/etherpad/Etherpad.js
+++ b/modules/UI/etherpad/Etherpad.js
@@ -1,4 +1,4 @@
-/* global $ */
+/* global $, interfaceConfig */
import VideoLayout from '../videolayout/VideoLayout';
import LargeContainer from '../videolayout/LargeContainer';
@@ -123,8 +123,15 @@ class Etherpad extends LargeContainer {
*
*/
resize(containerWidth, containerHeight) {
- const height = containerHeight - Filmstrip.getFilmstripHeight();
- const width = containerWidth;
+ let height, width;
+
+ if (interfaceConfig.VERTICAL_FILMSTRIP) {
+ height = containerHeight;
+ width = containerWidth - Filmstrip.getFilmstripWidth();
+ } else {
+ height = containerHeight - Filmstrip.getFilmstripHeight();
+ width = containerWidth;
+ }
$(this.iframe)
.width(width)
diff --git a/modules/UI/shared_video/SharedVideo.js b/modules/UI/shared_video/SharedVideo.js
index 6cdccc2619..120adc3fed 100644
--- a/modules/UI/shared_video/SharedVideo.js
+++ b/modules/UI/shared_video/SharedVideo.js
@@ -1,4 +1,6 @@
-/* global $, APP, YT, onPlayerReady, onPlayerStateChange, onPlayerError */
+/* global $, APP, YT, interfaceConfig, onPlayerReady, onPlayerStateChange,
+onPlayerError */
+
const logger = require('jitsi-meet-logger').getLogger(__filename);
import UIUtil from '../util/UIUtil';
@@ -681,9 +683,15 @@ class SharedVideoContainer extends LargeContainer {
*
*/
resize(containerWidth, containerHeight) {
- const height = containerHeight - Filmstrip.getFilmstripHeight();
+ let height, width;
- const width = containerWidth;
+ if (interfaceConfig.VERTICAL_FILMSTRIP) {
+ height = containerHeight;
+ width = containerWidth - Filmstrip.getFilmstripWidth();
+ } else {
+ height = containerHeight - Filmstrip.getFilmstripHeight();
+ width = containerWidth;
+ }
this.$iframe.width(width).height(height);
}
diff --git a/modules/UI/videolayout/Filmstrip.js b/modules/UI/videolayout/Filmstrip.js
index 6bc74981ce..403eb33de1 100644
--- a/modules/UI/videolayout/Filmstrip.js
+++ b/modules/UI/videolayout/Filmstrip.js
@@ -200,7 +200,18 @@ const Filmstrip = {
}
return 0;
+ },
+ /**
+ * Returns the width of filmstip
+ * @returns {number} width
+ */
+ getFilmstripWidth() {
+ return this.isFilmstripVisible()
+ ? this.filmstrip.outerWidth()
+ - parseInt(this.filmstrip.css('paddingLeft'), 10)
+ - parseInt(this.filmstrip.css('paddingRight'), 10)
+ : 0;
},
/**
diff --git a/modules/UI/videolayout/VideoContainer.js b/modules/UI/videolayout/VideoContainer.js
index 0893e8ed9a..d7d6565b82 100644
--- a/modules/UI/videolayout/VideoContainer.js
+++ b/modules/UI/videolayout/VideoContainer.js
@@ -33,8 +33,13 @@ function computeDesktopVideoSize( // eslint-disable-line max-params
let availableWidth = Math.max(videoWidth, videoSpaceWidth);
let availableHeight = Math.max(videoHeight, videoSpaceHeight);
- // eslint-disable-next-line no-param-reassign
- videoSpaceHeight -= Filmstrip.getFilmstripHeight();
+ if (interfaceConfig.VERTICAL_FILMSTRIP) {
+ // eslint-disable-next-line no-param-reassign
+ videoSpaceWidth -= Filmstrip.getFilmstripWidth();
+ } else {
+ // eslint-disable-next-line no-param-reassign
+ videoSpaceHeight -= Filmstrip.getFilmstripHeight();
+ }
if (availableWidth / aspectRatio >= videoSpaceHeight) {
availableHeight = videoSpaceHeight;
@@ -334,9 +339,15 @@ export class VideoContainer extends LargeContainer {
getVideoPosition(width, height, containerWidth, containerHeight) {
/* eslint-enable max-params */
if (this.stream && this.isScreenSharing()) {
+ let availableContainerWidth = containerWidth;
+
+ if (interfaceConfig.VERTICAL_FILMSTRIP) {
+ availableContainerWidth -= Filmstrip.getFilmstripWidth();
+ }
+
return getDesktopVideoPosition(width,
height,
- containerWidth,
+ availableContainerWidth,
containerHeight);
}