29 lines
501 B
TypeScript
29 lines
501 B
TypeScript
|
|
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="100%"
|
||
|
|
playing
|
||
|
|
pip
|
||
|
|
controls
|
||
|
|
config={{
|
||
|
|
file: {
|
||
|
|
attributes: {
|
||
|
|
controlsList: "nodownload",
|
||
|
|
},
|
||
|
|
},
|
||
|
|
}}
|
||
|
|
url={url}
|
||
|
|
/>
|
||
|
|
);
|
||
|
|
};
|
||
|
|
|
||
|
|
export default VideoPlayer;
|