Fix launch movie

This commit is contained in:
x8r 2025-09-20 16:12:40 -05:00
commit 67acd6ea78
2 changed files with 10 additions and 4 deletions

View file

@ -60,7 +60,7 @@
href="https://forms.gle/Aj2pX9dXKSRJMzRT8"
target="_blank"
class="github-link"
style="color: yellow"
style="color: yellow;"
>here</a
>.
</p>
@ -86,6 +86,8 @@
</div>
</center>
<div class="backdrop-blur"></div>
<video src="assets/intro.mp4" id="introVid" autoplay></video>
<video src="assets/intro.mp4" id="introVid" autoplay>
</video>
<p id="opening" style="color: black; z-index: 100; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); display: none;">Please Click.</p>
</body>
</html>

View file

@ -1,11 +1,14 @@
const vid = document.getElementById("introVid");
const p = document.getElementById("opening")
console.debug(vid)
p.style.display = "block";
const seen = sessionStorage.getItem("seenVid")
if (seen !== "true") {
document.addEventListener("mousemove", () => {
document.addEventListener("click", () => {
vid.play();
p.style.display = "none";
});
vid.addEventListener("ended", () => {
@ -17,5 +20,6 @@ if (seen !== "true") {
}, 300); // small delay so opacity fade is visible
});
} else {
vid.style.display = "none"
vid.style.display = "none"
p.style.display = "none"
}