Browse Source

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

- Modify Etherpad and SharedVideo so their resizing takes into account
  the width of the filmstrip in vertical filmstrip mode.
- Modify Filmstrip's getFilmstripWidth to account for when the filmstrip
  is hidden.
- modify VideoContainer so in vertical filmstrip mode it centers the
  shared desktop stream in the middle of the available space not taken
  by filmstrip.
- Also allow clickthrough on the secondary toolbar itself while still
  allowing clicks on the toolbar's buttons. This allows clicks on
  shared videos to go through.
j8
Leonard Kim 7 years ago
parent
commit
a653816f90

+ 5
- 0
css/_toolbars.scss View File

186
         justify-content: flex-start;
186
         justify-content: flex-start;
187
         left: 0;
187
         left: 0;
188
         padding-top: 24px;
188
         padding-top: 24px;
189
+        pointer-events: none;
189
         top: 0;
190
         top: 0;
190
         transform: translateX(-100%);
191
         transform: translateX(-100%);
191
         width: $defaultToolbarSize;
192
         width: $defaultToolbarSize;
197
             line-height: $secToolbarLineHeight;
198
             line-height: $secToolbarLineHeight;
198
         }
199
         }
199
 
200
 
201
+        > * {
202
+            pointer-events: auto
203
+        }
204
+
200
         .button.toggled:not(.icon-raised-hand):not(.button-active) {
205
         .button.toggled:not(.icon-raised-hand):not(.button-active) {
201
             background: $secondaryToolbarBg;
206
             background: $secondaryToolbarBg;
202
             cursor: pointer;
207
             cursor: pointer;

+ 5
- 0
css/_vertical_filmstrip_overrides.scss View File

14
         min-width: 0;
14
         min-width: 0;
15
     }
15
     }
16
 
16
 
17
+    #etherpad,
18
+    #sharedvideo {
19
+        text-align: left;
20
+    }
21
+
17
     .filmstrip {
22
     .filmstrip {
18
         align-items: flex-end;
23
         align-items: flex-end;
19
         box-sizing: border-box;
24
         box-sizing: border-box;

+ 10
- 3
modules/UI/etherpad/Etherpad.js View File

1
-/* global $ */
1
+/* global $, interfaceConfig */
2
 
2
 
3
 import VideoLayout from '../videolayout/VideoLayout';
3
 import VideoLayout from '../videolayout/VideoLayout';
4
 import LargeContainer from '../videolayout/LargeContainer';
4
 import LargeContainer from '../videolayout/LargeContainer';
123
      *
123
      *
124
      */
124
      */
125
     resize(containerWidth, containerHeight) {
125
     resize(containerWidth, containerHeight) {
126
-        const height = containerHeight - Filmstrip.getFilmstripHeight();
127
-        const width = containerWidth;
126
+        let height, width;
127
+
128
+        if (interfaceConfig.VERTICAL_FILMSTRIP) {
129
+            height = containerHeight;
130
+            width = containerWidth - Filmstrip.getFilmstripWidth();
131
+        } else {
132
+            height = containerHeight - Filmstrip.getFilmstripHeight();
133
+            width = containerWidth;
134
+        }
128
 
135
 
129
         $(this.iframe)
136
         $(this.iframe)
130
             .width(width)
137
             .width(width)

+ 11
- 3
modules/UI/shared_video/SharedVideo.js View File

1
-/* global $, APP, YT, onPlayerReady, onPlayerStateChange, onPlayerError */
1
+/* global $, APP, YT, interfaceConfig, onPlayerReady, onPlayerStateChange,
2
+onPlayerError */
3
+
2
 const logger = require('jitsi-meet-logger').getLogger(__filename);
4
 const logger = require('jitsi-meet-logger').getLogger(__filename);
3
 
5
 
4
 import UIUtil from '../util/UIUtil';
6
 import UIUtil from '../util/UIUtil';
681
      *
683
      *
682
      */
684
      */
683
     resize(containerWidth, containerHeight) {
685
     resize(containerWidth, containerHeight) {
684
-        const height = containerHeight - Filmstrip.getFilmstripHeight();
686
+        let height, width;
685
 
687
 
686
-        const width = containerWidth;
688
+        if (interfaceConfig.VERTICAL_FILMSTRIP) {
689
+            height = containerHeight;
690
+            width = containerWidth - Filmstrip.getFilmstripWidth();
691
+        } else {
692
+            height = containerHeight - Filmstrip.getFilmstripHeight();
693
+            width = containerWidth;
694
+        }
687
 
695
 
688
         this.$iframe.width(width).height(height);
696
         this.$iframe.width(width).height(height);
689
     }
697
     }

+ 11
- 0
modules/UI/videolayout/Filmstrip.js View File

200
         }
200
         }
201
 
201
 
202
         return 0;
202
         return 0;
203
+    },
203
 
204
 
205
+    /**
206
+     * Returns the width of filmstip
207
+     * @returns {number} width
208
+     */
209
+    getFilmstripWidth() {
210
+        return this.isFilmstripVisible()
211
+            ? this.filmstrip.outerWidth()
212
+                - parseInt(this.filmstrip.css('paddingLeft'), 10)
213
+                - parseInt(this.filmstrip.css('paddingRight'), 10)
214
+            : 0;
204
     },
215
     },
205
 
216
 
206
     /**
217
     /**

+ 14
- 3
modules/UI/videolayout/VideoContainer.js View File

33
     let availableWidth = Math.max(videoWidth, videoSpaceWidth);
33
     let availableWidth = Math.max(videoWidth, videoSpaceWidth);
34
     let availableHeight = Math.max(videoHeight, videoSpaceHeight);
34
     let availableHeight = Math.max(videoHeight, videoSpaceHeight);
35
 
35
 
36
-    // eslint-disable-next-line no-param-reassign
37
-    videoSpaceHeight -= Filmstrip.getFilmstripHeight();
36
+    if (interfaceConfig.VERTICAL_FILMSTRIP) {
37
+        // eslint-disable-next-line no-param-reassign
38
+        videoSpaceWidth -= Filmstrip.getFilmstripWidth();
39
+    } else {
40
+        // eslint-disable-next-line no-param-reassign
41
+        videoSpaceHeight -= Filmstrip.getFilmstripHeight();
42
+    }
38
 
43
 
39
     if (availableWidth / aspectRatio >= videoSpaceHeight) {
44
     if (availableWidth / aspectRatio >= videoSpaceHeight) {
40
         availableHeight = videoSpaceHeight;
45
         availableHeight = videoSpaceHeight;
334
     getVideoPosition(width, height, containerWidth, containerHeight) {
339
     getVideoPosition(width, height, containerWidth, containerHeight) {
335
         /* eslint-enable max-params */
340
         /* eslint-enable max-params */
336
         if (this.stream && this.isScreenSharing()) {
341
         if (this.stream && this.isScreenSharing()) {
342
+            let availableContainerWidth = containerWidth;
343
+
344
+            if (interfaceConfig.VERTICAL_FILMSTRIP) {
345
+                availableContainerWidth -= Filmstrip.getFilmstripWidth();
346
+            }
347
+
337
             return getDesktopVideoPosition(width,
348
             return getDesktopVideoPosition(width,
338
                 height,
349
                 height,
339
-                containerWidth,
350
+                availableContainerWidth,
340
                 containerHeight);
351
                 containerHeight);
341
         }
352
         }
342
 
353
 

Loading…
Cancel
Save