Skip to content

Commit

Permalink
loop video
Browse files Browse the repository at this point in the history
  • Loading branch information
kchenturtles committed Jul 22, 2024
1 parent faa5afc commit cb39f3a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/CardModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,12 @@ const CardModal: React.FC<Props> = ({
});
} else {
console.log(backgroundVideo);
const videoID = backgroundVideo.split("v=")[1];
setVideoURL(
backgroundVideo
.replace("watch?v=", "embed/")
.concat(
"?autohide=1&autoplay=1&showinfo=0=1&iv_load_policy=2&controls=0&mute=1"
`?autohide=1&autoplay=1&showinfo=0=1&iv_load_policy=2&controls=0&mute=1&loop=1&playlist=${videoID}`
)
);
setURLProvided(true);
Expand Down

0 comments on commit cb39f3a

Please sign in to comment.