2017-02-07 14:45:51 +00:00
|
|
|
/* @flow */
|
2017-01-10 21:55:31 +00:00
|
|
|
|
2016-11-23 21:46:46 +00:00
|
|
|
import React, { Component } from 'react';
|
2016-12-12 21:13:17 +00:00
|
|
|
import { connect as reactReduxConnect } from 'react-redux';
|
|
|
|
|
2017-01-10 21:55:31 +00:00
|
|
|
import { connect, disconnect } from '../../base/connection';
|
2017-03-07 03:34:51 +00:00
|
|
|
import { DialogContainer } from '../../base/dialog';
|
2017-01-17 22:16:08 +00:00
|
|
|
import { Watermarks } from '../../base/react';
|
2017-01-31 20:58:48 +00:00
|
|
|
import { OverlayContainer } from '../../overlay';
|
2017-04-01 05:52:40 +00:00
|
|
|
import { Toolbox } from '../../toolbox';
|
2017-02-21 22:24:47 +00:00
|
|
|
import { HideNotificationBarStyle } from '../../unsupported-browser';
|
2017-01-31 20:58:48 +00:00
|
|
|
|
2017-02-07 14:45:51 +00:00
|
|
|
declare var $: Function;
|
|
|
|
declare var APP: Object;
|
|
|
|
|
2016-11-23 21:46:46 +00:00
|
|
|
/**
|
2017-02-02 16:49:14 +00:00
|
|
|
* The conference page of the Web application.
|
2016-11-23 21:46:46 +00:00
|
|
|
*/
|
2016-12-12 21:13:17 +00:00
|
|
|
class Conference extends Component {
|
2017-01-10 21:55:31 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 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();
|
|
|
|
|
2017-02-15 21:39:16 +00:00
|
|
|
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() {
|
2017-02-15 21:39:16 +00:00
|
|
|
APP.UI.unregisterListeners();
|
|
|
|
APP.UI.unbindEvents();
|
|
|
|
|
2017-02-02 16:01:03 +00:00
|
|
|
APP.conference.isJoined() && this.props.dispatch(disconnect());
|
2016-12-12 21:13:17 +00:00
|
|
|
}
|
|
|
|
|
2016-11-23 21:46:46 +00:00
|
|
|
/**
|
|
|
|
* Implements React's {@link Component#render()}.
|
|
|
|
*
|
|
|
|
* @inheritdoc
|
|
|
|
* @returns {ReactElement}
|
|
|
|
*/
|
|
|
|
render() {
|
|
|
|
return (
|
|
|
|
<div id = 'videoconference_page'>
|
2017-04-01 05:52:40 +00:00
|
|
|
<Toolbox />
|
2017-03-20 16:04:54 +00:00
|
|
|
|
2016-11-23 21:46:46 +00:00
|
|
|
<div id = 'videospace'>
|
|
|
|
<div
|
|
|
|
className = 'videocontainer'
|
|
|
|
id = 'largeVideoContainer'>
|
|
|
|
<div id = 'sharedVideo'>
|
|
|
|
<div id = 'sharedVideoIFrame' />
|
|
|
|
</div>
|
|
|
|
<div id = 'etherpad' />
|
2017-01-17 22:16:08 +00:00
|
|
|
|
|
|
|
<Watermarks />
|
|
|
|
|
2016-11-23 21:46:46 +00:00
|
|
|
<div id = 'dominantSpeaker'>
|
|
|
|
<div className = 'dynamic-shadow' />
|
|
|
|
<img
|
|
|
|
id = 'dominantSpeakerAvatar'
|
|
|
|
src = '' />
|
|
|
|
</div>
|
|
|
|
<span id = 'remoteConnectionMessage' />
|
|
|
|
<div id = 'largeVideoWrapper'>
|
|
|
|
<video
|
|
|
|
autoPlay = { true }
|
|
|
|
id = 'largeVideo'
|
|
|
|
muted = 'true' />
|
|
|
|
</div>
|
|
|
|
<span id = 'localConnectionMessage' />
|
|
|
|
<span
|
|
|
|
className = 'video-state-indicator moveToCorner'
|
|
|
|
id = 'videoResolutionLabel'>HD</span>
|
|
|
|
<span
|
|
|
|
className
|
|
|
|
= 'video-state-indicator centeredVideoLabel'
|
|
|
|
id = 'recordingLabel'>
|
|
|
|
<span id = 'recordingLabelText' />
|
|
|
|
<img
|
|
|
|
className = 'recordingSpinner'
|
|
|
|
id = 'recordingSpinner'
|
|
|
|
src = 'images/spin.svg' />
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<div className = 'filmstrip'>
|
|
|
|
<div
|
|
|
|
className = 'filmstrip__videos'
|
|
|
|
id = 'remoteVideos'>
|
|
|
|
<span
|
|
|
|
className = 'videocontainer'
|
|
|
|
id = 'localVideoContainer'>
|
2017-02-02 16:49:14 +00:00
|
|
|
<div className = 'videocontainer__background' />
|
2016-11-23 21:46:46 +00:00
|
|
|
<span id = 'localVideoWrapper' />
|
|
|
|
<audio
|
|
|
|
autoPlay = { true }
|
|
|
|
id = 'localAudio'
|
|
|
|
muted = { true } />
|
|
|
|
<div className = 'videocontainer__toolbar' />
|
2017-02-02 16:49:14 +00:00
|
|
|
<div className = 'videocontainer__toptoolbar' />
|
2016-11-23 21:46:46 +00:00
|
|
|
<div
|
|
|
|
className
|
|
|
|
= 'videocontainer__hoverOverlay' />
|
|
|
|
</span>
|
|
|
|
<audio
|
|
|
|
id = 'userJoined'
|
|
|
|
preload = 'auto'
|
|
|
|
src = 'sounds/joined.wav' />
|
|
|
|
<audio
|
|
|
|
id = 'userLeft'
|
|
|
|
preload = 'auto'
|
|
|
|
src = 'sounds/left.wav' />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-02-16 23:02:40 +00:00
|
|
|
|
2017-03-07 03:34:51 +00:00
|
|
|
<DialogContainer />
|
2017-01-31 20:58:48 +00:00
|
|
|
<OverlayContainer />
|
2017-02-21 22:24:47 +00:00
|
|
|
<HideNotificationBarStyle />
|
2016-11-23 21:46:46 +00:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
2016-12-12 21:13:17 +00:00
|
|
|
|
|
|
|
export default reactReduxConnect()(Conference);
|