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.

34 lines
881 B

  1. import React from 'react';
  2. import ImmutablePropTypes from 'react-immutable-proptypes';
  3. import PropTypes from 'prop-types';
  4. import Video from 'flavours/glitch/features/video';
  5. import ImmutablePureComponent from 'react-immutable-pure-component';
  6. export default class VideoModal extends ImmutablePureComponent {
  7. static propTypes = {
  8. media: ImmutablePropTypes.map.isRequired,
  9. time: PropTypes.number,
  10. onClose: PropTypes.func.isRequired,
  11. };
  12. render () {
  13. const { media, time, onClose } = this.props;
  14. return (
  15. <div className='modal-root__modal video-modal'>
  16. <div>
  17. <Video
  18. preview={media.get('preview_url')}
  19. src={media.get('url')}
  20. startTime={time}
  21. onCloseVideo={onClose}
  22. detailed
  23. alt={media.get('description')}
  24. />
  25. </div>
  26. </div>
  27. );
  28. }
  29. }