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