Skip to content

Commit

Permalink
feat: make lightmode optional for video
Browse files Browse the repository at this point in the history
  • Loading branch information
eleanorreem committed Dec 27, 2024
1 parent 9d5404e commit 6bd3a88
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion components/video/Video.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ interface VideoProps {
containerStyles?: SxProps<Theme>;
setVideoStarted?: Dispatch<SetStateAction<boolean>>;
setVideoFinished?: Dispatch<SetStateAction<boolean>>;
lightMode?: boolean;
}

const Video = (props: VideoProps) => {
Expand All @@ -37,7 +38,9 @@ const Video = (props: VideoProps) => {
containerStyles,
setVideoStarted,
setVideoFinished,
lightMode = true,
} = props;

const [videoDuration, setVideoDuration] = useState<number>(0);
const [videoCompleted, setVideoCompleted] = useState<boolean>(false);
const [videoTimePlayed, setVideoTimePlayed] = useState<number>(0);
Expand Down Expand Up @@ -112,7 +115,7 @@ const Video = (props: VideoProps) => {
<Box sx={videoContainerStyle}>
<ReactPlayer
ref={player}
light={true}
light={lightMode}
onDuration={(duration) => setVideoDuration(duration)}
onStart={videoStarted}
onEnded={videoEnded}
Expand Down

0 comments on commit 6bd3a88

Please sign in to comment.