You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

UserMediaPermissionsFilmstripOnlyOverlay.js 2.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. import React, { Component } from 'react';
  2. import { translate, translateToHTML } from '../../base/i18n';
  3. import FilmstripOnlyOverlayFrame from './FilmstripOnlyOverlayFrame';
  4. /**
  5. * Implements a React Component for overlay with guidance how to proceed with
  6. * gUM prompt. This component will be displayed only for filmstrip only mode.
  7. */
  8. class UserMediaPermissionsFilmstripOnlyOverlay extends Component {
  9. /**
  10. * UserMediaPermissionsFilmstripOnlyOverlay component's property types.
  11. *
  12. * @static
  13. */
  14. static propTypes = {
  15. /**
  16. * The browser which is used currently. The text is different for every
  17. * browser.
  18. *
  19. * @public
  20. * @type {string}
  21. */
  22. browser: React.PropTypes.string,
  23. /**
  24. * The function to translate human-readable text.
  25. *
  26. * @public
  27. * @type {Function}
  28. */
  29. t: React.PropTypes.func
  30. }
  31. /**
  32. * Implements React's {@link Component#render()}.
  33. *
  34. * @inheritdoc
  35. * @returns {ReactElement|null}
  36. */
  37. render() {
  38. const { t } = this.props;
  39. const textKey = `userMedia.${this.props.browser}GrantPermissions`;
  40. return (
  41. <FilmstripOnlyOverlayFrame
  42. icon = 'icon-mic-camera-combined'
  43. isLightOverlay = { true }>
  44. <div className = 'inlay-filmstrip-only__container'>
  45. <div className = 'inlay-filmstrip-only__title'>
  46. {
  47. t('startupoverlay.title',
  48. { postProcess: 'resolveAppName' })
  49. }
  50. </div>
  51. <div className = 'inlay-filmstrip-only__text'>
  52. {
  53. translateToHTML(t, textKey)
  54. }
  55. </div>
  56. </div>
  57. </FilmstripOnlyOverlayFrame>
  58. );
  59. }
  60. }
  61. export default translate(UserMediaPermissionsFilmstripOnlyOverlay);