mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-11-26 03:46:06 -05:00
10
components/video/FullPageVideo.module.scss
Normal file
10
components/video/FullPageVideo.module.scss
Normal file
@@ -0,0 +1,10 @@
|
||||
.wrapper {
|
||||
position: relative;
|
||||
padding-top: 56.25%; // 100 / (1280 / 720)
|
||||
}
|
||||
|
||||
.react_player {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
12
components/video/FullPageVideo.tsx
Normal file
12
components/video/FullPageVideo.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import ReactPlayer from "react-player/lazy";
|
||||
import type { ReactPlayerProps } from "react-player";
|
||||
|
||||
import styles from "./FullPageVideo.module.scss";
|
||||
|
||||
export default function Video(props: ReactPlayerProps) {
|
||||
return (
|
||||
<div className={styles.wrapper}>
|
||||
<ReactPlayer className={styles.react_player} width="100%" height="100%" {...props} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user