Merge pull request #10289 from pedrobmarin/data-savings-presentation-area

Check video data savings to set presentation max-height
This commit is contained in:
Anton Georgiev 2020-08-19 15:39:37 -04:00 committed by GitHub
commit fdc14ba42b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,7 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
import Settings from '/imports/ui/services/settings';
import WebcamDraggable from './webcam-draggable-overlay/component';
import { styles } from './styles';
@ -58,6 +59,9 @@ export default class Media extends Component {
[styles.floatingOverlay]: (webcamPlacement === 'floating'),
});
const { viewParticipantsWebcams } = Settings.dataSaving;
const fullHeight = usersVideo.length < 1 || (webcamPlacement === 'floating') || !viewParticipantsWebcams;
return (
<div
id="container"
@ -67,7 +71,7 @@ export default class Media extends Component {
<div
className={!swapLayout ? contentClassName : overlayClassName}
style={{
maxHeight: usersVideo.length < 1 || (webcamPlacement === 'floating') ? '100%' : '80%',
maxHeight: fullHeight ? '100%' : '80%',
minHeight: '20%',
}}
>