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.
 
 
 
 

34 lines
849 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 media-modal'>
  16. <div>
  17. <Video
  18. preview={media.get('preview_url')}
  19. src={media.get('url')}
  20. startTime={time}
  21. onCloseVideo={onClose}
  22. description={media.get('description')}
  23. />
  24. </div>
  25. </div>
  26. );
  27. }
  28. }