mediahub-fe/utils/video-player.tsx

29 lines
501 B
TypeScript
Raw Normal View History

2024-12-13 14:33:59 +00:00
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;