2017-05-02 20:04:16 -04:00
|
|
|
import React from 'react';
|
2017-04-13 09:04:18 -04:00
|
|
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
2017-04-21 14:05:35 -04:00
|
|
|
import PropTypes from 'prop-types';
|
2017-09-13 21:39:10 -04:00
|
|
|
import Video from '../../video';
|
2017-05-02 20:04:16 -04:00
|
|
|
import ImmutablePureComponent from 'react-immutable-pure-component';
|
2017-04-13 09:04:18 -04:00
|
|
|
|
2017-06-23 13:36:54 -04:00
|
|
|
export default class VideoModal extends ImmutablePureComponent {
|
2017-04-13 09:04:18 -04:00
|
|
|
|
2017-05-12 08:44:10 -04:00
|
|
|
static propTypes = {
|
|
|
|
media: ImmutablePropTypes.map.isRequired,
|
|
|
|
time: PropTypes.number,
|
|
|
|
onClose: PropTypes.func.isRequired,
|
|
|
|
};
|
|
|
|
|
2017-04-13 09:04:18 -04:00
|
|
|
render () {
|
2017-09-13 21:39:10 -04:00
|
|
|
const { media, time, onClose } = this.props;
|
2017-04-13 09:04:18 -04:00
|
|
|
|
|
|
|
return (
|
|
|
|
<div className='modal-root__modal media-modal'>
|
|
|
|
<div>
|
2017-09-13 21:39:10 -04:00
|
|
|
<Video
|
|
|
|
preview={media.get('preview_url')}
|
|
|
|
src={media.get('url')}
|
|
|
|
startTime={time}
|
|
|
|
onCloseVideo={onClose}
|
|
|
|
/>
|
2017-04-13 09:04:18 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2017-04-21 14:05:35 -04:00
|
|
|
}
|