|
|
|
@ -8,6 +8,7 @@ import { getConferenceNameForTitle } from '../../../base/conference'; |
|
|
|
|
import { connect, disconnect } from '../../../base/connection'; |
|
|
|
|
import { translate } from '../../../base/i18n'; |
|
|
|
|
import { connect as reactReduxConnect } from '../../../base/redux'; |
|
|
|
|
import { setColorAlpha } from '../../../base/util'; |
|
|
|
|
import { Chat } from '../../../chat'; |
|
|
|
|
import { Filmstrip } from '../../../filmstrip'; |
|
|
|
|
import { CalleeInfoContainer } from '../../../invite'; |
|
|
|
@ -61,6 +62,11 @@ const LAYOUT_CLASSNAMES = { |
|
|
|
|
*/ |
|
|
|
|
type Props = AbstractProps & { |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* The alpha(opacity) of the background |
|
|
|
|
*/ |
|
|
|
|
_backgroundAlpha: number, |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Whether the local participant is recording the conference. |
|
|
|
|
*/ |
|
|
|
@ -98,6 +104,7 @@ class Conference extends AbstractConference<Props, *> { |
|
|
|
|
_onFullScreenChange: Function; |
|
|
|
|
_onShowToolbar: Function; |
|
|
|
|
_originalOnShowToolbar: Function; |
|
|
|
|
_setBackground: Function; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Initializes a new Conference instance. |
|
|
|
@ -121,6 +128,7 @@ class Conference extends AbstractConference<Props, *> { |
|
|
|
|
|
|
|
|
|
// Bind event handler so it is only bound once for every instance.
|
|
|
|
|
this._onFullScreenChange = this._onFullScreenChange.bind(this); |
|
|
|
|
this._setBackground = this._setBackground.bind(this); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -186,7 +194,8 @@ class Conference extends AbstractConference<Props, *> { |
|
|
|
|
<div |
|
|
|
|
className = { _layoutClassName } |
|
|
|
|
id = 'videoconference_page' |
|
|
|
|
onMouseMove = { this._onShowToolbar }> |
|
|
|
|
onMouseMove = { this._onShowToolbar } |
|
|
|
|
ref = { this._setBackground }> |
|
|
|
|
|
|
|
|
|
<Notice /> |
|
|
|
|
<div id = 'videospace'> |
|
|
|
@ -208,6 +217,35 @@ class Conference extends AbstractConference<Props, *> { |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Sets custom background opacity based on config. It also applies the |
|
|
|
|
* opacity on parent element, as the parent element is not accessible directly, |
|
|
|
|
* only though it's child. |
|
|
|
|
* |
|
|
|
|
* @param {Object} element - The DOM element for which to apply opacity. |
|
|
|
|
* |
|
|
|
|
* @private |
|
|
|
|
* @returns {void} |
|
|
|
|
*/ |
|
|
|
|
_setBackground(element) { |
|
|
|
|
if (!element) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (this.props._backgroundAlpha !== undefined) { |
|
|
|
|
const elemColor = element.style.background; |
|
|
|
|
const alphaElemColor = setColorAlpha(elemColor, this.props._backgroundAlpha); |
|
|
|
|
|
|
|
|
|
element.style.background = alphaElemColor; |
|
|
|
|
if (element.parentElement) { |
|
|
|
|
const parentColor = element.parentElement.style.background; |
|
|
|
|
const alphaParentColor = setColorAlpha(parentColor, this.props._backgroundAlpha); |
|
|
|
|
|
|
|
|
|
element.parentElement.style.background = alphaParentColor; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Updates the Redux state when full screen mode has been enabled or |
|
|
|
|
* disabled. |
|
|
|
@ -265,6 +303,7 @@ function _mapStateToProps(state) { |
|
|
|
|
return { |
|
|
|
|
...abstractMapStateToProps(state), |
|
|
|
|
_iAmRecorder: state['features/base/config'].iAmRecorder, |
|
|
|
|
_backgroundAlpha: state['features/base/config'].backgroundAlpha, |
|
|
|
|
_isLobbyScreenVisible: state['features/base/dialog']?.component === LobbyScreen, |
|
|
|
|
_layoutClassName: LAYOUT_CLASSNAMES[getCurrentLayout(state)], |
|
|
|
|
_roomName: getConferenceNameForTitle(state), |
|
|
|
|