import React from 'react';
import PropTypes from 'prop-types';
import {getVideo} from '../utils/video';
import { Player } from 'video-react';
class VideoPlayer extends React.Component {
  render() {
    return (
      <section>
        <Player  src={getVideo(this.props.id)} controls>
        </Player>
        <h2 className='video-player-title'>{this.props.title}</h2>
        <h3 className="video-player-date text-left">date {this.props.date} </h3>
        <p className="text-left">{this.props.description}</p>
      </section>

    )
  }
}

VideoPlayer.propTypes = {
  title: PropTypes.string,
  date: PropTypes.string,
  description: PropTypes.string
};


export default VideoPlayer;