added music correctly
This commit is contained in:
parent
c0887f5e71
commit
6c3380709d
@ -64,12 +64,15 @@ body {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 9999;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.loading-text {
|
||||
color: #00ffff;
|
||||
font-family: 'Orbitron', sans-serif;
|
||||
font-size: 2rem;
|
||||
text-shadow: 0 0 10px #00ffff;
|
||||
z-index: 9999;
|
||||
cursor: pointer;
|
||||
animation: pulse 1.5s infinite;
|
||||
}
|
||||
|
||||
|
||||
@ -47,8 +47,8 @@ const playlist = [
|
||||
|
||||
let currentTrack = 0;
|
||||
const audio = new Audio();
|
||||
audio.loop = false;
|
||||
audio.volume = 0.5;
|
||||
audio.loop = true;
|
||||
audio.volume = 0.2;
|
||||
|
||||
const nowPlaying = document.getElementById('now-playing');
|
||||
const playPauseBtn = document.getElementById('play-pause-btn');
|
||||
@ -89,3 +89,15 @@ audio.addEventListener('ended', () => {
|
||||
document.getElementById('loading-screen')?.addEventListener('click', () => {
|
||||
loadTrack(0);
|
||||
});
|
||||
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
const loadingScreen = document.getElementById('loading-screen');
|
||||
const music = new Audio(); // your audio logic might be handled elsewhere now
|
||||
|
||||
if (loadingScreen) {
|
||||
loadingScreen.addEventListener('click', () => {
|
||||
loadingScreen.style.display = 'none'; // hides the full screen
|
||||
loadTrack(0); // start the music playlist
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user