This commit is contained in:
parent
858e817027
commit
674ce7f6d6
4 changed files with 66 additions and 3 deletions
27
src/pages/components/playVideo.jsx
Normal file
27
src/pages/components/playVideo.jsx
Normal file
|
@ -0,0 +1,27 @@
|
|||
import '../../css/video.css'
|
||||
|
||||
function PlayVideo({ src="hallway_FFF.mp4" }) {
|
||||
const urlSource = `${import.meta.env.VITE_ASSETS_URL}/${src}`;
|
||||
|
||||
return(
|
||||
<div className="video-container">
|
||||
<video
|
||||
autoPlay
|
||||
muted
|
||||
controls="none"
|
||||
playsInline
|
||||
loop
|
||||
pointerEvents="none"
|
||||
onLoadedData={(e) => {
|
||||
e.target.play()
|
||||
console.log("played");
|
||||
}}
|
||||
>
|
||||
<source src={urlSource} type="video/mp4"/>
|
||||
Your browser does not support the video tag.
|
||||
</video>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default PlayVideo
|
Loading…
Add table
Add a link
Reference in a new issue