47 lines
854 B
TypeScript
47 lines
854 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}
|
|
// />
|
|
<ReactPlayer
|
|
className="react-player"
|
|
width="100%"
|
|
height="100%"
|
|
controls
|
|
playing
|
|
muted
|
|
pip={false} //
|
|
config={{
|
|
file: {
|
|
attributes: {
|
|
controlsList: "nodownload",
|
|
},
|
|
},
|
|
}}
|
|
url={url}
|
|
/>
|
|
);
|
|
};
|
|
|
|
export default VideoPlayer;
|