import React from 'react';
import ReactPlayer from 'react-player';

var VideoPlayer = function VideoPlayer(_ref) {
  var url = _ref.url,
      autoPlay = _ref.autoPlay;
  return /*#__PURE__*/React.createElement("div", {
    className: "video-holder"
  }, /*#__PURE__*/React.createElement(ReactPlayer, {
    className: "react-player",
    url: url,
    width: "100%",
    playing: autoPlay,
    playbackRate: 1.0,
    light: !autoPlay,
    muted: autoPlay,
    controls: autoPlay
  }));
};

VideoPlayer.displayName = 'Video Player';
var VideoPlayerDoc;

if (process.env.NODE_ENV !== 'production') {
  // eslint-disable-next-line global-require
  VideoPlayerDoc = require('./doc').doc(VideoPlayer);
}

var VideoPlayerWrapper = VideoPlayerDoc || VideoPlayer;
export { VideoPlayerWrapper as VideoPlayer };