|
@@ -8,6 +8,7 @@ import { getConferenceNameForTitle } from '../../../base/conference';
|
8
|
8
|
import { connect, disconnect } from '../../../base/connection';
|
9
|
9
|
import { translate } from '../../../base/i18n';
|
10
|
10
|
import { connect as reactReduxConnect } from '../../../base/redux';
|
|
11
|
+import { setColorAlpha } from '../../../base/util';
|
11
|
12
|
import { Chat } from '../../../chat';
|
12
|
13
|
import { Filmstrip } from '../../../filmstrip';
|
13
|
14
|
import { CalleeInfoContainer } from '../../../invite';
|
|
@@ -61,6 +62,11 @@ const LAYOUT_CLASSNAMES = {
|
61
|
62
|
*/
|
62
|
63
|
type Props = AbstractProps & {
|
63
|
64
|
|
|
65
|
+ /**
|
|
66
|
+ * The alpha(opacity) of the background
|
|
67
|
+ */
|
|
68
|
+ _backgroundAlpha: number,
|
|
69
|
+
|
64
|
70
|
/**
|
65
|
71
|
* Whether the local participant is recording the conference.
|
66
|
72
|
*/
|
|
@@ -98,6 +104,7 @@ class Conference extends AbstractConference<Props, *> {
|
98
|
104
|
_onFullScreenChange: Function;
|
99
|
105
|
_onShowToolbar: Function;
|
100
|
106
|
_originalOnShowToolbar: Function;
|
|
107
|
+ _setBackground: Function;
|
101
|
108
|
|
102
|
109
|
/**
|
103
|
110
|
* Initializes a new Conference instance.
|
|
@@ -121,6 +128,7 @@ class Conference extends AbstractConference<Props, *> {
|
121
|
128
|
|
122
|
129
|
// Bind event handler so it is only bound once for every instance.
|
123
|
130
|
this._onFullScreenChange = this._onFullScreenChange.bind(this);
|
|
131
|
+ this._setBackground = this._setBackground.bind(this);
|
124
|
132
|
}
|
125
|
133
|
|
126
|
134
|
/**
|
|
@@ -186,7 +194,8 @@ class Conference extends AbstractConference<Props, *> {
|
186
|
194
|
<div
|
187
|
195
|
className = { _layoutClassName }
|
188
|
196
|
id = 'videoconference_page'
|
189
|
|
- onMouseMove = { this._onShowToolbar }>
|
|
197
|
+ onMouseMove = { this._onShowToolbar }
|
|
198
|
+ ref = { this._setBackground }>
|
190
|
199
|
|
191
|
200
|
<Notice />
|
192
|
201
|
<div id = 'videospace'>
|
|
@@ -208,6 +217,35 @@ class Conference extends AbstractConference<Props, *> {
|
208
|
217
|
);
|
209
|
218
|
}
|
210
|
219
|
|
|
220
|
+ /**
|
|
221
|
+ * Sets custom background opacity based on config. It also applies the
|
|
222
|
+ * opacity on parent element, as the parent element is not accessible directly,
|
|
223
|
+ * only though it's child.
|
|
224
|
+ *
|
|
225
|
+ * @param {Object} element - The DOM element for which to apply opacity.
|
|
226
|
+ *
|
|
227
|
+ * @private
|
|
228
|
+ * @returns {void}
|
|
229
|
+ */
|
|
230
|
+ _setBackground(element) {
|
|
231
|
+ if (!element) {
|
|
232
|
+ return;
|
|
233
|
+ }
|
|
234
|
+
|
|
235
|
+ if (this.props._backgroundAlpha !== undefined) {
|
|
236
|
+ const elemColor = element.style.background;
|
|
237
|
+ const alphaElemColor = setColorAlpha(elemColor, this.props._backgroundAlpha);
|
|
238
|
+
|
|
239
|
+ element.style.background = alphaElemColor;
|
|
240
|
+ if (element.parentElement) {
|
|
241
|
+ const parentColor = element.parentElement.style.background;
|
|
242
|
+ const alphaParentColor = setColorAlpha(parentColor, this.props._backgroundAlpha);
|
|
243
|
+
|
|
244
|
+ element.parentElement.style.background = alphaParentColor;
|
|
245
|
+ }
|
|
246
|
+ }
|
|
247
|
+ }
|
|
248
|
+
|
211
|
249
|
/**
|
212
|
250
|
* Updates the Redux state when full screen mode has been enabled or
|
213
|
251
|
* disabled.
|
|
@@ -265,6 +303,7 @@ function _mapStateToProps(state) {
|
265
|
303
|
return {
|
266
|
304
|
...abstractMapStateToProps(state),
|
267
|
305
|
_iAmRecorder: state['features/base/config'].iAmRecorder,
|
|
306
|
+ _backgroundAlpha: state['features/base/config'].backgroundAlpha,
|
268
|
307
|
_isLobbyScreenVisible: state['features/base/dialog']?.component === LobbyScreen,
|
269
|
308
|
_layoutClassName: LAYOUT_CLASSNAMES[getCurrentLayout(state)],
|
270
|
309
|
_roomName: getConferenceNameForTitle(state),
|