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.

VideoQualityButton.web.js 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. import React, { Component } from 'react';
  2. import { VideoQualityDialog } from './';
  3. import { ToolbarButtonWithDialog } from '../../toolbox';
  4. /**
  5. * A configuration object to describe how {@code ToolbarButton} should render
  6. * the button.
  7. *
  8. * @type {object}
  9. */
  10. const DEFAULT_BUTTON_CONFIGURATION = {
  11. buttonName: 'videoquality',
  12. classNames: [ 'button', 'icon-visibility' ],
  13. enabled: true,
  14. id: 'toolbar_button_videoquality',
  15. tooltipKey: 'videoStatus.qualityButtonTip'
  16. };
  17. /**
  18. * React {@code Component} for displaying a button which will open an inline
  19. * dialog for changing received video quality settings.
  20. *
  21. * @extends Component
  22. */
  23. class VideoQualityButton extends Component {
  24. /**
  25. * {@code VideoQualityButton}'s property types.
  26. *
  27. * @static
  28. */
  29. static propTypes = {
  30. /**
  31. * From which side tooltips should display. Will be re-used for
  32. * displaying the inline dialog for video quality adjustment.
  33. */
  34. tooltipPosition: React.PropTypes.string
  35. };
  36. /**
  37. * Implements React's {@link Component#render()}.
  38. *
  39. * @inheritdoc
  40. * @returns {ReactElement}
  41. */
  42. render() {
  43. return (
  44. <ToolbarButtonWithDialog
  45. button = { DEFAULT_BUTTON_CONFIGURATION }
  46. content = { VideoQualityDialog }
  47. tooltipPosition = { this.props.tooltipPosition } />
  48. );
  49. }
  50. }
  51. export default VideoQualityButton;