Skip to content

Instantly share code, notes, and snippets.

@rahulmore01
Created November 1, 2023 16:58
Show Gist options
  • Save rahulmore01/eef3e844dff64047cd9c0dd591dd3a8d to your computer and use it in GitHub Desktop.
Save rahulmore01/eef3e844dff64047cd9c0dd591dd3a8d to your computer and use it in GitHub Desktop.
"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