/* global $, APP */ import React, { Component } from 'react'; import { connect as reactReduxConnect } from 'react-redux'; import { connect, disconnect } from '../../base/connection'; import { Watermarks } from '../../base/react'; /** * For legacy reasons, inline style for display none. * @type {{display: string}} */ const DISPLAY_NONE_STYLE = { display: 'none' }; /** * Implements a React Component which renders initial conference layout */ class Conference extends Component { /** * Conference component's property types. * * @static */ static propTypes = { dispatch: React.PropTypes.func } /** * Until we don't rewrite UI using react components * we use UI.start from old app. Also method translates * component right after it has been mounted. * * @inheritdoc */ componentDidMount() { APP.UI.start(); // XXX Temporary solution until we add React translation. APP.translation.translateElement($('#videoconference_page')); this.props.dispatch(connect()); } /** * Disconnect from the conference when component will be * unmounted. * * @inheritdoc */ componentWillUnmount() { this.props.dispatch(disconnect()); } /** * Implements React's {@link Component#render()}. * * @inheritdoc * @returns {ReactElement} */ render() { return (