Files
jitsi-meet/react/features/large-video/components/AbstractLabels.js
virtuacoplenny c353e9377f feat(tile-view): initial implementation for tile view (#3317)
* feat(tile-view): initial implementation for tile view

- Modify the classname on the app root so layout can adjust
  depending on the desired layout mode--vertical filmstrip,
  horizontal filmstrip, and tile view.
- Create a button for toggling tile view.
- Add a StateListenerRegistry to automatically update the
  selected participant and max receiver frame height on tile
  view toggle.
- Rezise thumbnails when switching in and out of tile view.
- Move the local video when switching in and out of tile view.
- Update reactified pieces of thumbnails when switching in and
  out of tile view.
- Cap the max receiver video quality in tile view based on tile
  size.
- Use CSS to hide UI components that should not display in tile
  view.
- Signal follow me changes.

* change local video id for tests

* change approach: leverage more css

* squash: fix some formatting

* squash: prevent pinning, hide pin border in tile view

* squash: change logic for maxReceiverQuality due to sidestepping resizing logic

* squash: fix typo, columns configurable, remove unused constants

* squash: resize with js again

* squash: use yana's math for calculating tile size
2018-08-08 13:48:23 -05:00

91 lines
2.2 KiB
JavaScript

// @flow
import React, { Component } from 'react';
import { isFilmstripVisible } from '../../filmstrip';
import { RecordingLabel } from '../../recording';
import { shouldDisplayTileView } from '../../video-layout';
import { VideoQualityLabel } from '../../video-quality';
import { TranscribingLabel } from '../../transcribing/';
/**
* The type of the React {@code Component} props of {@link AbstractLabels}.
*/
export type Props = {
/**
* Whether or not the filmstrip is displayed with remote videos. Used to
* determine display classes to set.
*/
_filmstripVisible: boolean,
/**
* Whether or not the video quality label should be displayed.
*/
_showVideoQualityLabel: boolean
};
/**
* A container to hold video status labels, including recording status and
* current large video quality.
*
* @extends Component
*/
export default class AbstractLabels<P: Props, S> extends Component<P, S> {
/**
* Renders the {@code RecordingLabel} that is platform independent.
*
* @protected
* @param {string} mode - The recording mode that this label is rendered
* for.
* @returns {React$Element}
*/
_renderRecordingLabel(mode: string) {
return (
<RecordingLabel mode = { mode } />
);
}
/**
* Renders the {@code VideoQualityLabel} that is platform independent.
*
* @protected
* @returns {React$Element}
*/
_renderVideoQualityLabel() {
return (
<VideoQualityLabel />
);
}
/**
* Renders the {@code TranscribingLabel}.
*
* @returns {React$Element}
* @protected
*/
_renderTranscribingLabel() {
return (
<TranscribingLabel />
);
}
}
/**
* Maps (parts of) the Redux state to the associated props for the
* {@code Labels} component.
*
* @param {Object} state - The Redux state.
* @private
* @returns {{
* _filmstripVisible: boolean,
* _showVideoQualityLabel: boolean
* }}
*/
export function _abstractMapStateToProps(state: Object) {
return {
_filmstripVisible: isFilmstripVisible(state),
_showVideoQualityLabel: !shouldDisplayTileView(state)
};
}