// @flow import React from 'react'; import { translate, translateToHTML } from '../../../base/i18n'; import { connect } from '../../../base/redux'; import AbstractUserMediaPermissionsOverlay, { abstractMapStateToProps } from './AbstractUserMediaPermissionsOverlay'; import OverlayFrame from './OverlayFrame'; declare var interfaceConfig: Object; /** * Implements a React Component for overlay with guidance how to proceed with * gUM prompt. */ class UserMediaPermissionsOverlay extends AbstractUserMediaPermissionsOverlay { /** * Implements React's {@link Component#render()}. * * @inheritdoc * @returns {ReactElement} */ render() { const { _premeetingBackground, browser, t } = this.props; const style = _premeetingBackground ? { background: _premeetingBackground, backgroundPosition: 'center', backgroundSize: 'cover' } : {}; return (

{ t('startupoverlay.genericTitle') }

{ translateToHTML(t, `userMedia.${browser}GrantPermissions`) }

{ translateToHTML(t, 'startupoverlay.policyText') }

{ this._renderPolicyLogo() }
); } /** * Renders the policy logo. * * @private * @returns {ReactElement|null} */ _renderPolicyLogo() { const policyLogoSrc = interfaceConfig.POLICY_LOGO; if (policyLogoSrc) { return (
{
); } return null; } } /** * Maps (parts of) the redux state to the React {@code Component} props. * * @param {Object} state - The redux state. * @param {Object} ownProps - The props passed to the component. * @returns {Object} */ function mapStateToProps(state): Object { const { premeetingBackground } = state['features/dynamic-branding']; return { ...abstractMapStateToProps(state), _premeetingBackground: premeetingBackground }; } export default translate( connect(mapStateToProps)(UserMediaPermissionsOverlay));