2018-12-06 20:33:29 +02:00
|
|
|
import React from 'react';
|
2018-12-07 20:21:25 +02:00
|
|
|
import Grid from 'react-css-grid';
|
2018-12-08 00:42:02 +02:00
|
|
|
import PropTypes from 'prop-types';
|
2018-12-08 00:01:09 +02:00
|
|
|
import { getVideo } from '../utils/video';
|
2018-12-06 20:33:29 +02:00
|
|
|
|
|
|
|
class VideoPlayer extends React.Component {
|
|
|
|
render() {
|
|
|
|
|
|
|
|
return (
|
2018-12-07 20:21:25 +02:00
|
|
|
<Grid width={450}
|
|
|
|
gap={16}>
|
|
|
|
<section>
|
2018-12-08 00:01:09 +02:00
|
|
|
<h2>{ this.props.title }</h2>
|
|
|
|
<video src={ getVideo(this.props.id) } controls>
|
2018-12-07 20:21:25 +02:00
|
|
|
</video>
|
2018-12-08 00:01:09 +02:00
|
|
|
<h3>date { this.props.date } </h3>
|
2018-12-07 20:21:25 +02:00
|
|
|
</section>
|
|
|
|
<section className="text-left">
|
2018-12-08 00:01:09 +02:00
|
|
|
<p>{ this.props.description }</p>
|
2018-12-07 20:21:25 +02:00
|
|
|
</section>
|
|
|
|
|
|
|
|
</Grid>
|
2018-12-06 20:33:29 +02:00
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-12-08 00:01:09 +02:00
|
|
|
VideoPlayer.propTypes = {
|
|
|
|
title: PropTypes.string,
|
2018-12-08 00:42:02 +02:00
|
|
|
date: PropTypes.string,
|
2018-12-08 00:01:09 +02:00
|
|
|
description: PropTypes.string
|
|
|
|
};
|
|
|
|
|
|
|
|
export default VideoPlayer;
|