1
0
mirror of https://github.com/funamitech/mastodon synced 2024-12-15 15:18:30 +09:00
YuruToot/app/javascript/mastodon/features/ui/components/video_modal.js

35 lines
870 B
JavaScript
Raw Normal View History

import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import Video from '../../video';
import ImmutablePureComponent from 'react-immutable-pure-component';
export default class VideoModal extends ImmutablePureComponent {
static propTypes = {
media: ImmutablePropTypes.map.isRequired,
time: PropTypes.number,
onClose: PropTypes.func.isRequired,
};
render () {
const { media, time, onClose } = this.props;
return (
<div className='modal-root__modal video-modal'>
<div>
<Video
preview={media.get('preview_url')}
src={media.get('url')}
startTime={time}
onCloseVideo={onClose}
detailed
description={media.get('description')}
/>
</div>
</div>
);
}
}