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

type VideoPlayerProps = {
  url: string;
};

const VideoPlayer: React.FC<VideoPlayerProps> = ({ url }) => {
  return (
    <ReactPlayer
      className="react-player"
      width="100%"
      height="auto"
      playing
      pip
      controls
      config={{
        file: {
          attributes: {
            controlsList: "nodownload",
          },
        },
      }}
      url={url}
    />
  );
};

export default VideoPlayer;