diff options
author | Indrajith K L | 2025-07-01 01:49:10 +0530 |
---|---|---|
committer | Indrajith K L | 2025-07-01 01:49:10 +0530 |
commit | 2bd1c332e2aaac3a9c329c3d8d93f4484299e011 (patch) | |
tree | 1d6b03337f3d8e8e7d685a3919c80db7c477ab83 /player.js | |
parent | c908577d3621aab29a40025fb69fd8695e021e57 (diff) | |
download | retrowave-player-2bd1c332e2aaac3a9c329c3d8d93f4484299e011.tar.gz retrowave-player-2bd1c332e2aaac3a9c329c3d8d93f4484299e011.tar.bz2 retrowave-player-2bd1c332e2aaac3a9c329c3d8d93f4484299e011.zip |
New Features
* Adds Glitch Entrance of Intro Modal (Into the Spiderverse Multidimensional jump)
Diffstat (limited to 'player.js')
-rw-r--r-- | player.js | 31 |
1 files changed, 31 insertions, 0 deletions
@@ -39,6 +39,19 @@ openDialog(); listenUploadFileChange(); + function showPlayerInterface() { + const musicPlayer = document.querySelector(".music-player"); + const progressBarContainer = document.getElementById("progress-bar-container"); + + if (musicPlayer) { + musicPlayer.classList.add("show"); + } + + if (progressBarContainer) { + progressBarContainer.classList.add("show"); + } + } + function initDynamicTooltips() { document.querySelectorAll("[title]").forEach((element) => { const title = element.getAttribute("title"); @@ -116,6 +129,12 @@ document.getElementById("initButton")?.addEventListener("click", async () => { var hydra = new Hydra({ detectAudio: false }); modalEl.classList.remove("open"); + + // Show the music player and progress bar with a slight delay for better effect + setTimeout(() => { + showPlayerInterface(); + }, 300); // Small delay to let the modal close animation start + getMusic().then(() => { playMusic(); }); @@ -128,6 +147,18 @@ downloadHistory(); }); + // Handle modal exit clicks (background and close button) + document.addEventListener("click", (event) => { + if (event.target.classList.contains("modal-exit") || event.target.id === "initButton") { + // Only trigger if modal is actually open + if (modalEl.classList.contains("open")) { + setTimeout(() => { + showPlayerInterface(); + }, 300); + } + } + }); + document.addEventListener("keyup", (event) => { if (!terminalOverlay.classList.contains("hidden")) { return; |