|
@@ -10,6 +10,7 @@ import {
|
10
|
10
|
sendAnalytics
|
11
|
11
|
} from '../../../analytics';
|
12
|
12
|
import { getToolbarButtons } from '../../../base/config';
|
|
13
|
+import { isMobileBrowser } from '../../../base/environment/utils';
|
13
|
14
|
import { translate } from '../../../base/i18n';
|
14
|
15
|
import { Icon, IconMenuDown, IconMenuUp } from '../../../base/icons';
|
15
|
16
|
import { connect } from '../../../base/redux';
|
|
@@ -17,7 +18,13 @@ import { showToolbox } from '../../../toolbox/actions.web';
|
17
|
18
|
import { isButtonEnabled, isToolboxVisible } from '../../../toolbox/functions.web';
|
18
|
19
|
import { LAYOUTS, getCurrentLayout } from '../../../video-layout';
|
19
|
20
|
import { setFilmstripVisible, setVisibleRemoteParticipants } from '../../actions';
|
20
|
|
-import { TILE_HORIZONTAL_MARGIN, TILE_VERTICAL_MARGIN, TOOLBAR_HEIGHT } from '../../constants';
|
|
21
|
+import {
|
|
22
|
+ ASPECT_RATIO_BREAKPOINT,
|
|
23
|
+ TILE_HORIZONTAL_MARGIN,
|
|
24
|
+ TILE_VERTICAL_MARGIN,
|
|
25
|
+ TOOLBAR_HEIGHT,
|
|
26
|
+ TOOLBAR_HEIGHT_MOBILE
|
|
27
|
+} from '../../constants';
|
21
|
28
|
import { shouldRemoteVideosBeVisible } from '../../functions';
|
22
|
29
|
|
23
|
30
|
import AudioTracksContainer from './AudioTracksContainer';
|
|
@@ -485,10 +492,6 @@ function _mapStateToProps(state) {
|
485
|
492
|
const reduceHeight = state['features/toolbox'].visible && toolbarButtons.length;
|
486
|
493
|
const remoteVideosVisible = shouldRemoteVideosBeVisible(state);
|
487
|
494
|
const { isOpen: shiftRight } = state['features/chat'];
|
488
|
|
- const className = `${remoteVideosVisible ? '' : 'hide-videos'} ${
|
489
|
|
- reduceHeight ? 'reduce-height' : ''
|
490
|
|
- } ${shiftRight ? 'shift-right' : ''}`.trim();
|
491
|
|
- const videosClassName = `filmstrip__videos${visible ? '' : ' hidden'}`;
|
492
|
495
|
const {
|
493
|
496
|
gridDimensions = {},
|
494
|
497
|
filmstripHeight,
|
|
@@ -496,12 +499,35 @@ function _mapStateToProps(state) {
|
496
|
499
|
thumbnailSize: tileViewThumbnailSize
|
497
|
500
|
} = state['features/filmstrip'].tileViewDimensions;
|
498
|
501
|
const _currentLayout = getCurrentLayout(state);
|
|
502
|
+
|
|
503
|
+ const { clientHeight, clientWidth } = state['features/base/responsive-ui'];
|
|
504
|
+ const availableSpace = clientHeight - filmstripHeight;
|
|
505
|
+ let filmstripPadding = 0;
|
|
506
|
+
|
|
507
|
+ if (availableSpace > 0) {
|
|
508
|
+ const paddingValue = TOOLBAR_HEIGHT_MOBILE - availableSpace;
|
|
509
|
+
|
|
510
|
+ if (paddingValue > 0) {
|
|
511
|
+ filmstripPadding = paddingValue;
|
|
512
|
+ }
|
|
513
|
+ } else {
|
|
514
|
+ filmstripPadding = TOOLBAR_HEIGHT_MOBILE;
|
|
515
|
+ }
|
|
516
|
+
|
|
517
|
+ const collapseTileView = reduceHeight
|
|
518
|
+ && isMobileBrowser()
|
|
519
|
+ && clientWidth <= ASPECT_RATIO_BREAKPOINT;
|
|
520
|
+
|
|
521
|
+ const className = `${remoteVideosVisible ? '' : 'hide-videos'} ${
|
|
522
|
+ reduceHeight ? 'reduce-height' : ''
|
|
523
|
+ } ${shiftRight ? 'shift-right' : ''} ${collapseTileView ? 'collapse' : ''}`.trim();
|
|
524
|
+ const videosClassName = `filmstrip__videos${visible ? '' : ' hidden'}`;
|
499
|
525
|
let _thumbnailSize, remoteFilmstripHeight, remoteFilmstripWidth;
|
500
|
526
|
|
501
|
527
|
switch (_currentLayout) {
|
502
|
528
|
case LAYOUTS.TILE_VIEW:
|
503
|
529
|
_thumbnailSize = tileViewThumbnailSize;
|
504
|
|
- remoteFilmstripHeight = filmstripHeight;
|
|
530
|
+ remoteFilmstripHeight = filmstripHeight - (collapseTileView && filmstripPadding > 0 ? filmstripPadding : 0);
|
505
|
531
|
remoteFilmstripWidth = filmstripWidth;
|
506
|
532
|
break;
|
507
|
533
|
case LAYOUTS.VERTICAL_FILMSTRIP_VIEW: {
|