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

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