Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
QuvonchbekBobojonov committed Apr 8, 2024
1 parent 8fb474a commit d78291c
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions frontend/src/components/body-overlay/index.jsx
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
import video1 from '../../assets/video1.mp4';
import video2 from '../../assets/video2.mp4';
import video3 from '../../assets/video3.mp4';
import video4 from '../../assets/video4.mp4';
import video5 from '../../assets/video5.mp4';
// import video2 from '../../assets/video2.mp4';
// import video3 from '../../assets/video3.mp4';
// import video4 from '../../assets/video4.mp4';
// import video5 from '../../assets/video5.mp4';

const videos = [
video1,
video2,
video3,
video4,
video5
];
// const videos = [
// video1,
// video2,
// video3,
// video4,
// video5
// ];

function getRandomVideo() {
const randomIndex = Math.floor(Math.random() * videos.length);
return videos[randomIndex];
}
// function getRandomVideo() {
// const randomIndex = Math.floor(Math.random() * videos.length);
// return videos[randomIndex];
// }

function BodyOverlay() {
const randomVideo = getRandomVideo();
// const randomVideo = getRandomVideo();
return (
<video className='body-overlay' muted autoPlay loop>
<source src={randomVideo} type="video/mp4" />
<source src={video1} type="video/mp4" />
</video>
);
}
Expand Down

0 comments on commit d78291c

Please sign in to comment.