filmstrip: hide scrollbar on SIP gateways

This commit is contained in:
Saúl Ibarra Corretgé 2020-02-25 13:06:58 +01:00 committed by Saúl Ibarra Corretgé
parent 6a7594cd9c
commit 9b141816d6
2 changed files with 22 additions and 8 deletions

View File

@ -136,6 +136,13 @@
display: flex;
transition: opacity 1s;
}
.hide-scrollbar#filmstripRemoteVideos {
margin-right: 7px; // Scrollbar size
&::-webkit-scrollbar {
display: none;
}
}
}
/**

View File

@ -53,6 +53,11 @@ type Props = {
*/
_filmstripWidth: number,
/**
* Whether the filmstrip scrollbar should be hidden or not.
*/
_hideScrollbar: boolean,
/**
* Whether or not remote videos are currently being hovered over. Hover
* handling is currently being handled detected outside of react.
@ -184,6 +189,12 @@ class Filmstrip extends Component <Props> {
}
}
let remoteVideosWrapperClassName = 'filmstrip__videos';
if (this.props._hideScrollbar) {
remoteVideosWrapperClassName += ' hide-scrollbar';
}
return (
<div
className = { `filmstrip ${this.props._className}` }
@ -201,7 +212,7 @@ class Filmstrip extends Component <Props> {
<div id = 'filmstripLocalVideoThumbnail' />
</div>
<div
className = 'filmstrip__videos'
className = { remoteVideosWrapperClassName }
id = 'filmstripRemoteVideos'>
{/*
* XXX This extra video container is needed for
@ -335,15 +346,10 @@ class Filmstrip extends Component <Props> {
*
* @param {Object} state - The Redux state.
* @private
* @returns {{
* _className: string,
* _filmstripOnly: boolean,
* _hovered: boolean,
* _videosClassName: string,
* _visible: boolean
* }}
* @returns {Props}
*/
function _mapStateToProps(state) {
const { iAmSipGateway } = state['features/base/config'];
const { hovered, visible } = state['features/filmstrip'];
const isFilmstripOnly = Boolean(interfaceConfig.filmStripOnly);
const reduceHeight
@ -362,6 +368,7 @@ function _mapStateToProps(state) {
_currentLayout: getCurrentLayout(state),
_filmstripOnly: isFilmstripOnly,
_filmstripWidth: filmstripWidth,
_hideScrollbar: Boolean(iAmSipGateway),
_hovered: hovered,
_rows: gridDimensions.rows,
_videosClassName: videosClassName,