jiti-meet/react/features/conference/components/Conference.web.js

94 lines
2.4 KiB
JavaScript
Raw Normal View History

2017-02-07 14:45:51 +00:00
/* @flow */
import React, { Component } from 'react';
2016-12-12 21:13:17 +00:00
import { connect as reactReduxConnect } from 'react-redux';
import { connect, disconnect } from '../../base/connection';
2017-03-07 03:34:51 +00:00
import { DialogContainer } from '../../base/dialog';
import { Filmstrip } from '../../filmstrip';
import { LargeVideo } from '../../large-video';
import { OverlayContainer } from '../../overlay';
2017-04-01 05:52:40 +00:00
import { Toolbox } from '../../toolbox';
import { HideNotificationBarStyle } from '../../unsupported-browser';
2017-02-07 14:45:51 +00:00
declare var $: Function;
declare var APP: Object;
/**
2017-02-02 16:49:14 +00:00
* The conference page of the Web application.
*/
2016-12-12 21:13:17 +00:00
class Conference extends Component {
/**
* Conference component's property types.
*
* @static
*/
static propTypes = {
dispatch: React.PropTypes.func
};
2016-12-12 21:13:17 +00:00
/**
* 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();
APP.UI.registerListeners();
APP.UI.bindEvents();
2016-12-12 21:13:17 +00:00
this.props.dispatch(connect());
}
/**
* Disconnect from the conference when component will be
* unmounted.
*
* @inheritdoc
*/
componentWillUnmount() {
APP.UI.stopDaemons();
APP.UI.unregisterListeners();
APP.UI.unbindEvents();
APP.conference.isJoined() && this.props.dispatch(disconnect());
2016-12-12 21:13:17 +00:00
}
/**
* Implements React's {@link Component#render()}.
*
* @inheritdoc
* @returns {ReactElement}
*/
render() {
return (
<div id = 'videoconference_page'>
<div id = 'videospace'>
<LargeVideo />
<Filmstrip />
</div>
2017-02-16 23:02:40 +00:00
<Toolbox />
2017-03-07 03:34:51 +00:00
<DialogContainer />
<OverlayContainer />
{/*
* Temasys automatically injects a notification bar, if
* necessary, displayed at the top of the page notifying that
* WebRTC is not installed or supported. We do not need/want
* the notification bar in question because we have whole pages
* dedicated to the respective scenarios.
*/}
<HideNotificationBarStyle />
</div>
);
}
}
2016-12-12 21:13:17 +00:00
export default reactReduxConnect()(Conference);