ソースを参照

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 8年前
コミット
a653816f90

+ 5
- 0
css/_toolbars.scss ファイルの表示

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

+ 5
- 0
css/_vertical_filmstrip_overrides.scss ファイルの表示

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

+ 10
- 3
modules/UI/etherpad/Etherpad.js ファイルの表示

@@ -1,4 +1,4 @@
1
-/* global $ */
1
+/* global $, interfaceConfig */
2 2
 
3 3
 import VideoLayout from '../videolayout/VideoLayout';
4 4
 import LargeContainer from '../videolayout/LargeContainer';
@@ -123,8 +123,15 @@ class Etherpad extends LargeContainer {
123 123
      *
124 124
      */
125 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 136
         $(this.iframe)
130 137
             .width(width)

+ 11
- 3
modules/UI/shared_video/SharedVideo.js ファイルの表示

@@ -1,4 +1,6 @@
1
-/* global $, APP, YT, onPlayerReady, onPlayerStateChange, onPlayerError */
1
+/* global $, APP, YT, interfaceConfig, onPlayerReady, onPlayerStateChange,
2
+onPlayerError */
3
+
2 4
 const logger = require('jitsi-meet-logger').getLogger(__filename);
3 5
 
4 6
 import UIUtil from '../util/UIUtil';
@@ -681,9 +683,15 @@ class SharedVideoContainer extends LargeContainer {
681 683
      *
682 684
      */
683 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 696
         this.$iframe.width(width).height(height);
689 697
     }

+ 11
- 0
modules/UI/videolayout/Filmstrip.js ファイルの表示

@@ -200,7 +200,18 @@ const Filmstrip = {
200 200
         }
201 201
 
202 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 ファイルの表示

@@ -33,8 +33,13 @@ function computeDesktopVideoSize( // eslint-disable-line max-params
33 33
     let availableWidth = Math.max(videoWidth, videoSpaceWidth);
34 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 44
     if (availableWidth / aspectRatio >= videoSpaceHeight) {
40 45
         availableHeight = videoSpaceHeight;
@@ -334,9 +339,15 @@ export class VideoContainer extends LargeContainer {
334 339
     getVideoPosition(width, height, containerWidth, containerHeight) {
335 340
         /* eslint-enable max-params */
336 341
         if (this.stream && this.isScreenSharing()) {
342
+            let availableContainerWidth = containerWidth;
343
+
344
+            if (interfaceConfig.VERTICAL_FILMSTRIP) {
345
+                availableContainerWidth -= Filmstrip.getFilmstripWidth();
346
+            }
347
+
337 348
             return getDesktopVideoPosition(width,
338 349
                 height,
339
-                containerWidth,
350
+                availableContainerWidth,
340 351
                 containerHeight);
341 352
         }
342 353
 

読み込み中…
キャンセル
保存