How can I make an intro video play only on the homepage?

Hello, i´m helping a friend create an website for her buisness, she really wanted a short intro video on the webpage and 16 hours later, i got something to work. But the problem is evertime the page refreshes or go to another section like "contact it plays the intro file, where it should just play the intro only when refreshing the “homepage” i hope some of you guys can help me, i´ll paste the code and a link to the website.

#overlay-video {
background-size: cover;
background-position: 50% 50%;
position: absolute;
margin: auto;
width: 100%;
height: 100%;
right: -100%;
bottom: -100%;
top: -100%;
left: -100%;
object-fit: cover;
z-index: -100;
}
.da-video-overlay {
z-index: 9999;
position: fixed;
inset: 0px;
display: flex;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
-webkit-box-pack: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-align: center;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
}
.da-video-wrap {
overflow: hidden;
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
z-index: 2;
width: 100%;
height: 100%;
border-radius: 10px;
}
.da-video-outer {
position: relative;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
overflow: hidden;
width: 100%;
height: 100%;
-webkit-box-pack: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-align: center;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
}

Sizing code

Player code-

  • Choosing a selection results in a full page refresh.
  • Press the space key then arrow keys to make a selection.
1 Like

Hi @eikbidstrup

Try to replace your script code with the code below

<
1 Like

Hello Made4Uo thank you so much for the reply.! i tried implementing your code in script but still experience the same problem. :disappointed_face: i´ll keep on trying thou.

Hi @eikbidstrup ,

Do you mind sharing your website?

1 Like

Ofc not! https://rhodflowers.myshopify.com/
thank you :wink:

I forgot to remove password, im at work so ill open the webpage in an hour or so. :slightly_smiling_face: