|
@@ -1,5 +1,6 @@
|
1
|
1
|
/* @flow */
|
2
|
2
|
|
|
3
|
+import _ from 'lodash';
|
3
|
4
|
import PropTypes from 'prop-types';
|
4
|
5
|
import React, { Component } from 'react';
|
5
|
6
|
import { connect as reactReduxConnect } from 'react-redux';
|
|
@@ -10,7 +11,7 @@ import { Filmstrip } from '../../filmstrip';
|
10
|
11
|
import { LargeVideo } from '../../large-video';
|
11
|
12
|
import { NotificationsContainer } from '../../notifications';
|
12
|
13
|
import { OverlayContainer } from '../../overlay';
|
13
|
|
-import { Toolbox } from '../../toolbox';
|
|
14
|
+import { showToolbox, Toolbox } from '../../toolbox';
|
14
|
15
|
import { HideNotificationBarStyle } from '../../unsupported-browser';
|
15
|
16
|
|
16
|
17
|
declare var $: Function;
|
|
@@ -21,6 +22,8 @@ declare var interfaceConfig: Object;
|
21
|
22
|
* The conference page of the Web application.
|
22
|
23
|
*/
|
23
|
24
|
class Conference extends Component {
|
|
25
|
+ _onShowToolbar: Function;
|
|
26
|
+ _originalOnShowToolbar: Function;
|
24
|
27
|
|
25
|
28
|
/**
|
26
|
29
|
* Conference component's property types.
|
|
@@ -31,6 +34,27 @@ class Conference extends Component {
|
31
|
34
|
dispatch: PropTypes.func
|
32
|
35
|
};
|
33
|
36
|
|
|
37
|
+ /**
|
|
38
|
+ * Initializes a new Conference instance.
|
|
39
|
+ *
|
|
40
|
+ * @param {Object} props - The read-only properties with which the new
|
|
41
|
+ * instance is to be initialized.
|
|
42
|
+ */
|
|
43
|
+ constructor(props) {
|
|
44
|
+ super(props);
|
|
45
|
+
|
|
46
|
+ // Throttle and bind this component's mousemove handler to prevent it
|
|
47
|
+ // from firing too often.
|
|
48
|
+ this._originalOnShowToolbar = this._onShowToolbar;
|
|
49
|
+ this._onShowToolbar = _.throttle(
|
|
50
|
+ () => this._originalOnShowToolbar(),
|
|
51
|
+ 100,
|
|
52
|
+ {
|
|
53
|
+ leading: true,
|
|
54
|
+ trailing: false
|
|
55
|
+ });
|
|
56
|
+ }
|
|
57
|
+
|
34
|
58
|
/**
|
35
|
59
|
* Until we don't rewrite UI using react components
|
36
|
60
|
* we use UI.start from old app. Also method translates
|
|
@@ -71,7 +95,9 @@ class Conference extends Component {
|
71
|
95
|
const { filmStripOnly } = interfaceConfig;
|
72
|
96
|
|
73
|
97
|
return (
|
74
|
|
- <div id = 'videoconference_page'>
|
|
98
|
+ <div
|
|
99
|
+ id = 'videoconference_page'
|
|
100
|
+ onMouseMove = { this._onShowToolbar }>
|
75
|
101
|
<div id = 'videospace'>
|
76
|
102
|
<LargeVideo />
|
77
|
103
|
<Filmstrip filmstripOnly = { filmStripOnly } />
|
|
@@ -94,6 +120,16 @@ class Conference extends Component {
|
94
|
120
|
</div>
|
95
|
121
|
);
|
96
|
122
|
}
|
|
123
|
+
|
|
124
|
+ /**
|
|
125
|
+ * Displays the toolbar.
|
|
126
|
+ *
|
|
127
|
+ * @private
|
|
128
|
+ * @returns {void}
|
|
129
|
+ */
|
|
130
|
+ _onShowToolbar() {
|
|
131
|
+ this.props.dispatch(showToolbox());
|
|
132
|
+ }
|
97
|
133
|
}
|
98
|
134
|
|
99
|
135
|
export default reactReduxConnect()(Conference);
|