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