2017-03-09 00:16:53 +00:00
|
|
|
import React, { Component } from 'react';
|
|
|
|
|
|
|
|
import { translate, translateToHTML } from '../../base/i18n';
|
|
|
|
|
2017-04-10 17:59:44 +00:00
|
|
|
import FilmstripOnlyOverlayFrame from './FilmstripOnlyOverlayFrame';
|
2017-03-09 00:16:53 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Implements a React Component for overlay with guidance how to proceed with
|
|
|
|
* gUM prompt. This component will be displayed only for filmstrip only mode.
|
|
|
|
*/
|
2017-04-10 17:59:44 +00:00
|
|
|
class UserMediaPermissionsFilmstripOnlyOverlay extends Component {
|
2017-03-09 00:16:53 +00:00
|
|
|
/**
|
2017-04-10 17:59:44 +00:00
|
|
|
* UserMediaPermissionsFilmstripOnlyOverlay component's property types.
|
2017-03-09 00:16:53 +00:00
|
|
|
*
|
|
|
|
* @static
|
|
|
|
*/
|
|
|
|
static propTypes = {
|
|
|
|
/**
|
|
|
|
* The browser which is used currently. The text is different for every
|
|
|
|
* browser.
|
|
|
|
*
|
|
|
|
* @public
|
|
|
|
* @type {string}
|
|
|
|
*/
|
|
|
|
browser: React.PropTypes.string,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The function to translate human-readable text.
|
|
|
|
*
|
|
|
|
* @public
|
|
|
|
* @type {Function}
|
|
|
|
*/
|
|
|
|
t: React.PropTypes.func
|
2017-06-02 02:01:50 +00:00
|
|
|
};
|
2017-03-09 00:16:53 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Implements React's {@link Component#render()}.
|
|
|
|
*
|
|
|
|
* @inheritdoc
|
|
|
|
* @returns {ReactElement|null}
|
|
|
|
*/
|
|
|
|
render() {
|
|
|
|
const { t } = this.props;
|
|
|
|
const textKey = `userMedia.${this.props.browser}GrantPermissions`;
|
|
|
|
|
|
|
|
return (
|
2017-04-10 17:59:44 +00:00
|
|
|
<FilmstripOnlyOverlayFrame
|
2017-03-09 00:16:53 +00:00
|
|
|
icon = 'icon-mic-camera-combined'
|
|
|
|
isLightOverlay = { true }>
|
|
|
|
<div className = 'inlay-filmstrip-only__container'>
|
|
|
|
<div className = 'inlay-filmstrip-only__title'>
|
|
|
|
{
|
|
|
|
t('startupoverlay.title',
|
|
|
|
{ postProcess: 'resolveAppName' })
|
|
|
|
}
|
|
|
|
</div>
|
|
|
|
<div className = 'inlay-filmstrip-only__text'>
|
|
|
|
{
|
|
|
|
translateToHTML(t, textKey)
|
|
|
|
}
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-04-10 17:59:44 +00:00
|
|
|
</FilmstripOnlyOverlayFrame>
|
2017-03-09 00:16:53 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-04-10 17:59:44 +00:00
|
|
|
export default translate(UserMediaPermissionsFilmstripOnlyOverlay);
|