Created
November 1, 2023 16:58
-
-
Save rahulmore01/eef3e844dff64047cd9c0dd591dd3a8d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use client"; | |
import React from "react"; | |
import ReactPlayer from "react-player"; | |
const VideoPlayer = () => { | |
//video path | |
let videosrc = "/videos/next.mp4"; | |
return ( | |
<div> | |
<h1>my custome player</h1> | |
<ReactPlayer | |
width="500px" | |
height="400px" | |
url={videosrc} | |
controls={true} | |
// light is usefull incase of dark mode | |
light={false} | |
// picture in picture | |
pip={true} | |
/> | |
<source src={videosrc} type="video/mp4" /> | |
</div> | |
); | |
}; | |
export default VideoPlayer; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment