瀏覽代碼

filmstrip: hide scrollbar on SIP gateways

j8
Saúl Ibarra Corretgé 5 年之前
父節點
當前提交
9b141816d6
共有 2 個檔案被更改,包括 22 行新增8 行删除
  1. 7
    0
      css/filmstrip/_vertical_filmstrip.scss
  2. 15
    8
      react/features/filmstrip/components/web/Filmstrip.js

+ 7
- 0
css/filmstrip/_vertical_filmstrip.scss 查看文件

@@ -136,6 +136,13 @@
136 136
         display: flex;
137 137
         transition: opacity 1s;
138 138
     }
139
+
140
+    .hide-scrollbar#filmstripRemoteVideos {
141
+        margin-right: 7px; // Scrollbar size
142
+        &::-webkit-scrollbar {
143
+            display: none;
144
+        }
145
+    }
139 146
 }
140 147
 
141 148
 /**

+ 15
- 8
react/features/filmstrip/components/web/Filmstrip.js 查看文件

@@ -53,6 +53,11 @@ type Props = {
53 53
      */
54 54
     _filmstripWidth: number,
55 55
 
56
+    /**
57
+     * Whether the filmstrip scrollbar should be hidden or not.
58
+     */
59
+    _hideScrollbar: boolean,
60
+
56 61
     /**
57 62
      * Whether or not remote videos are currently being hovered over. Hover
58 63
      * handling is currently being handled detected outside of react.
@@ -184,6 +189,12 @@ class Filmstrip extends Component <Props> {
184 189
         }
185 190
         }
186 191
 
192
+        let remoteVideosWrapperClassName = 'filmstrip__videos';
193
+
194
+        if (this.props._hideScrollbar) {
195
+            remoteVideosWrapperClassName += ' hide-scrollbar';
196
+        }
197
+
187 198
         return (
188 199
             <div
189 200
                 className = { `filmstrip ${this.props._className}` }
@@ -201,7 +212,7 @@ class Filmstrip extends Component <Props> {
201 212
                         <div id = 'filmstripLocalVideoThumbnail' />
202 213
                     </div>
203 214
                     <div
204
-                        className = 'filmstrip__videos'
215
+                        className = { remoteVideosWrapperClassName }
205 216
                         id = 'filmstripRemoteVideos'>
206 217
                         {/*
207 218
                           * XXX This extra video container is needed for
@@ -335,15 +346,10 @@ class Filmstrip extends Component <Props> {
335 346
  *
336 347
  * @param {Object} state - The Redux state.
337 348
  * @private
338
- * @returns {{
339
- *     _className: string,
340
- *     _filmstripOnly: boolean,
341
- *     _hovered: boolean,
342
- *     _videosClassName: string,
343
- *     _visible: boolean
344
- * }}
349
+ * @returns {Props}
345 350
  */
346 351
 function _mapStateToProps(state) {
352
+    const { iAmSipGateway } = state['features/base/config'];
347 353
     const { hovered, visible } = state['features/filmstrip'];
348 354
     const isFilmstripOnly = Boolean(interfaceConfig.filmStripOnly);
349 355
     const reduceHeight
@@ -362,6 +368,7 @@ function _mapStateToProps(state) {
362 368
         _currentLayout: getCurrentLayout(state),
363 369
         _filmstripOnly: isFilmstripOnly,
364 370
         _filmstripWidth: filmstripWidth,
371
+        _hideScrollbar: Boolean(iAmSipGateway),
365 372
         _hovered: hovered,
366 373
         _rows: gridDimensions.rows,
367 374
         _videosClassName: videosClassName,

Loading…
取消
儲存