"use client";

import dynamic from "next/dynamic";

const ReactPlayer = dynamic(() => import("react-player"), { ssr: false });

type VideoPlayerProps = {
  src: string;
  width?: string | number;
  height?: string | number;
};

export default function VideoPlayer({
  src,
  width = "100%",
  height = "100%",
}: VideoPlayerProps) {
  return <ReactPlayer src={src} width={width} height={height} controls />;
}
