logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe git clone https://hacktivis.me/git/mastofe.git

video_modal.js (870B)


  1. import React from 'react';
  2. import ImmutablePropTypes from 'react-immutable-proptypes';
  3. import PropTypes from 'prop-types';
  4. import Video from '../../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. description={media.get('description')}
  24. />
  25. </div>
  26. </div>
  27. );
  28. }
  29. }