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
868 B
34 lines
868 B
8 years ago
|
import React from 'react';
|
||
8 years ago
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||
8 years ago
|
import PropTypes from 'prop-types';
|
||
7 years ago
|
import Video from 'flavours/glitch/features/video';
|
||
8 years ago
|
import ImmutablePureComponent from 'react-immutable-pure-component';
|
||
8 years ago
|
|
||
8 years ago
|
export default class VideoModal extends ImmutablePureComponent {
|
||
8 years ago
|
|
||
8 years ago
|
static propTypes = {
|
||
|
media: ImmutablePropTypes.map.isRequired,
|
||
|
time: PropTypes.number,
|
||
|
onClose: PropTypes.func.isRequired,
|
||
|
};
|
||
|
|
||
8 years ago
|
render () {
|
||
7 years ago
|
const { media, time, onClose } = this.props;
|
||
8 years ago
|
|
||
|
return (
|
||
|
<div className='modal-root__modal media-modal'>
|
||
|
<div>
|
||
7 years ago
|
<Video
|
||
|
preview={media.get('preview_url')}
|
||
|
src={media.get('url')}
|
||
|
startTime={time}
|
||
|
onCloseVideo={onClose}
|
||
7 years ago
|
description={media.get('description')}
|
||
7 years ago
|
/>
|
||
8 years ago
|
</div>
|
||
|
</div>
|
||
|
);
|
||
|
}
|
||
|
|
||
8 years ago
|
}
|