2019-03-20 15:09:23 -05:00
|
|
|
import React, { Component } from 'react';
|
|
|
|
|
|
2023-03-27 11:34:33 +03:00
|
|
|
import { IReduxState } from '../../app/types';
|
2019-03-20 15:09:23 -05:00
|
|
|
import { NotificationsContainer } from '../../notifications/components';
|
2023-03-27 11:34:33 +03:00
|
|
|
import { shouldDisplayTileView } from '../../video-layout/functions.any';
|
2020-05-20 12:57:03 +02:00
|
|
|
import { shouldDisplayNotifications } from '../functions';
|
2019-02-07 16:52:31 -06:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* The type of the React {@code Component} props of {@link AbstractLabels}.
|
|
|
|
|
*/
|
|
|
|
|
export type AbstractProps = {
|
|
|
|
|
|
2019-03-20 15:09:23 -05:00
|
|
|
/**
|
|
|
|
|
* Set to {@code true} when the notifications are to be displayed.
|
|
|
|
|
*
|
|
|
|
|
* @protected
|
|
|
|
|
* @type {boolean}
|
|
|
|
|
*/
|
2023-03-27 11:34:33 +03:00
|
|
|
_notificationsVisible: boolean;
|
2019-03-20 15:09:23 -05:00
|
|
|
|
2019-02-07 16:52:31 -06:00
|
|
|
/**
|
|
|
|
|
* Conference room name.
|
|
|
|
|
*
|
|
|
|
|
* @protected
|
|
|
|
|
* @type {string}
|
|
|
|
|
*/
|
2023-03-27 11:34:33 +03:00
|
|
|
_room: string;
|
2019-02-07 16:52:31 -06:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Whether or not the layout should change to support tile view mode.
|
|
|
|
|
*
|
|
|
|
|
* @protected
|
|
|
|
|
* @type {boolean}
|
|
|
|
|
*/
|
2023-03-27 11:34:33 +03:00
|
|
|
_shouldDisplayTileView: boolean;
|
2019-02-07 16:52:31 -06:00
|
|
|
};
|
|
|
|
|
|
2019-03-20 15:09:23 -05:00
|
|
|
/**
|
|
|
|
|
* A container to hold video status labels, including recording status and
|
|
|
|
|
* current large video quality.
|
|
|
|
|
*
|
2021-11-04 22:10:43 +01:00
|
|
|
* @augments Component
|
2019-03-20 15:09:23 -05:00
|
|
|
*/
|
2023-03-27 11:34:33 +03:00
|
|
|
export class AbstractConference<P extends AbstractProps, S>
|
2019-03-20 15:09:23 -05:00
|
|
|
extends Component<P, S> {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Renders the {@code LocalRecordingLabel}.
|
|
|
|
|
*
|
|
|
|
|
* @param {Object} props - The properties to be passed to
|
|
|
|
|
* the {@code NotificationsContainer}.
|
|
|
|
|
* @protected
|
|
|
|
|
* @returns {React$Element}
|
|
|
|
|
*/
|
2023-03-27 11:34:33 +03:00
|
|
|
renderNotificationsContainer(props?: any) {
|
2019-03-20 15:09:23 -05:00
|
|
|
if (this.props._notificationsVisible) {
|
|
|
|
|
return (
|
|
|
|
|
React.createElement(NotificationsContainer, props)
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2019-02-07 16:52:31 -06:00
|
|
|
/**
|
|
|
|
|
* Maps (parts of) the redux state to the associated props of the {@link Labels}
|
|
|
|
|
* {@code Component}.
|
|
|
|
|
*
|
|
|
|
|
* @param {Object} state - The redux state.
|
|
|
|
|
* @private
|
|
|
|
|
* @returns {AbstractProps}
|
|
|
|
|
*/
|
2023-03-27 11:34:33 +03:00
|
|
|
export function abstractMapStateToProps(state: IReduxState) {
|
2019-02-07 16:52:31 -06:00
|
|
|
return {
|
2019-03-20 15:09:23 -05:00
|
|
|
_notificationsVisible: shouldDisplayNotifications(state),
|
2023-04-13 15:49:34 +03:00
|
|
|
_room: state['features/base/conference'].room ?? '',
|
2019-02-07 16:52:31 -06:00
|
|
|
_shouldDisplayTileView: shouldDisplayTileView(state)
|
|
|
|
|
};
|
|
|
|
|
}
|