The code powering m.abunchtell.com https://m.abunchtell.com
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.
 
 
 
 

36 lines
907 B

  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. blurhash={media.get('blurhash')}
  20. src={media.get('url')}
  21. startTime={time}
  22. onCloseVideo={onClose}
  23. detailed
  24. alt={media.get('description')}
  25. />
  26. </div>
  27. </div>
  28. );
  29. }
  30. }