diff --git a/src/css/video.css b/src/css/video.css new file mode 100644 index 0000000..7d9c93e --- /dev/null +++ b/src/css/video.css @@ -0,0 +1,33 @@ +/* .video-container { + height: 100vh; + overflow: hidden; +} */ +.video-container { + height: 100vh; + overflow: hidden; +} + +@media (orientation: landscape) { + .video-container { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + width: 100%; + height: 100%; + } +} + +.video-container video { + width: 100%; + height: 100%; + object-fit: cover; + + pointer-events: none; + -webkit-media-controls: none; + -webkit-media-controls-play-button: none; + -webkit-media-controls-timeline: none; + -webkit-media-controls-current-time-display: none; + -webkit-media-controls-time-remaining-display: none; + -webkit-media-controls-toggle-closed-captions-button: none; +} \ No newline at end of file diff --git a/src/main.jsx b/src/main.jsx index ac70799..3ad86f8 100644 --- a/src/main.jsx +++ b/src/main.jsx @@ -8,7 +8,7 @@ import WarningPage from './pages/warningPage.jsx'; import NamePage from './pages/namePage.jsx'; import Animation from './pages/components/animation.jsx'; import IntroductionPage from './pages/introductionPage.jsx'; - +import PlayVideo from './pages/components/playVideo.jsx' createRoot(document.getElementById('root')).render( @@ -18,6 +18,7 @@ createRoot(document.getElementById('root')).render( } /> } /> } /> + } /> } /> } /> diff --git a/src/pages/components/playVideo.jsx b/src/pages/components/playVideo.jsx new file mode 100644 index 0000000..38f689e --- /dev/null +++ b/src/pages/components/playVideo.jsx @@ -0,0 +1,27 @@ +import '../../css/video.css' + +function PlayVideo({ src="hallway_FFF.mp4" }) { + const urlSource = `${import.meta.env.VITE_ASSETS_URL}/${src}`; + + return( +
+ +
+ ) +} + +export default PlayVideo diff --git a/src/pages/introductionPage.jsx b/src/pages/introductionPage.jsx index eaa12b4..0b6e36b 100644 --- a/src/pages/introductionPage.jsx +++ b/src/pages/introductionPage.jsx @@ -2,6 +2,7 @@ import { useState } from 'react' import '../css/global.css' import BlackButton from './components/customButton' import Animation from './components/animation.jsx'; +import PlayVideo from './components/playVideo.jsx'; function IntroductionPage() { return( @@ -13,7 +14,7 @@ function IntroductionPage() { maxWidth:"100vw", flexDirection: 'column', }}> -
+ {/*
@@ -30,7 +31,8 @@ function IntroductionPage() {
-
+
*/} +